skip to Main Content

Cannot connect .NET app with MongoDB (System.MissingMethodException: Method not found:)

I am simply trying to connect my MongoDB cluster with my .NET app, but when I test my routes with swagger i get this error: System.MissingMethodException: Method not found: 'MongoDB.Bson.GuidRepresentationMode MongoDB.Bson.BsonDefaults.get_GuidRepresentationMode()'. at MongoDB.Driver.MongoUrlBuilder..ctor() at MongoDB.Driver.MongoUrlBuilder..ctor(String url) at Microsoft.EntityFrameworkCore.MongoOptionsExtension.SanitizeConnectionStringForLogging(String connectionString) at…

VIEW QUESTION

Asp.net – Entity Framework: Save Private Field

I'm using Entity Framework with MongoDB. I have a class, Account with the following field: private readonly byte[] salt; Account is configured in Entity Framework like so: protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity<Account>().ToCollection("accounts"); } When I save an…

VIEW QUESTION
Back To Top
Search