Error while getting documents from mongoDb using c#

89 views Asked by At

I'm trying to get document from mongoDB using .net core2.2 console application. i uploaded mongoDB.driver nuget package when ever i'm tring to run code locally it is giving mongo document as expected but after deployment i'm getting below error.

Could not load file or assembly 'MongoDB.Libmongocrypt, Version=1.0.0.0

below is the code which

MongoDbConnection connection = new MongoDbConnection("DBConnection");
                MongoClient _mongoClient = connection.MongoConnection;

                IMongoDatabase lumenDb = _mongoClient.GetDatabase("Database");Collection              
                var document = collection.Find(doc
                  => doc.ConversationId == model.ConversationId).FirstOrDefault();
0

There are 0 answers