Adding custom type converter to MongoDB in C#

I covered how to impelement a custom type converter for MongoDB in my previous article. In this article, I want to cover adding a serializer to MongoDB 'serializer'. There are couple of tricks you can use to make your life easier. Unlike EF Core with its IEntityTypeConfiguration<TType>, MongoDB driver is more static. You can specify ... Read more Adding custom type converter to MongoDB in C#

Custom type converters for MongoDB

I always try to keep my models seperate from the implementation or configuration. EF Core 2.1 added great support for custom type converters with HasConversion. MongoDB also has a support for custom type conversion, though it is not quite as well documented. The basic premise revolves around implementing IBsonSerializer<TType>. Let's suppose I have a Bitrate ... Read more Custom type converters for MongoDB

How to resolve: MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-1.

I came across this error today whilst trying to deploy my application on Azure. MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-1. As it turns out, MongoDB may have separate databases for authentication and data and therefore it is essential to specify ... Read more How to resolve: MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-1.