If you’re using the MongoDB C# driver with ASP.NET MVC and have a property of type ObjectId in your model you will get the following error when trying to bind back to the model. The parameter conversion from type ‘System.String’ to type ‘MongoDB.Bson.ObjectId’ failed because no type converter can convert between these types. This can easily be resolved by creating a custom Model Binder which I’ll explain how to do in this article. Normally I try not to use third … →
↧