mongodb-provider-ef-core

MongoDB Provider for Entity Framework Core

What’s in the new Provider for EF Core

With the general availability release, the MongoDB Provider for EF Core offers developers the following capabilities, building upon the foundational features released in the public preview:

  • Compatibility with Entity Framework Core 8 & .NET 8: Fully compatible with the latest EF Core and .NET versions, ensuring your projects are up-to-date with the newest features and improvements.
  • Advanced Querying and Data Operations: Provides a comprehensive suite of querying options, including complex operations and aggregates like Where, OrderBy, and ThenBy, enabling precise data retrieval and deeper analytical insights within your applications.
  • Mapping and Configuration Flexibility: Extended mapping capabilities for properties and entities, including support for various data types and composite keys, providing greater flexibility and precision in how data is structured and stored.
  • Array and List Handling: Improved handling of arrays and lists, enabling more complex data structures to be easily managed and manipulated within your applications.
  • Logging: Enhanced logging for better visibility of operations.
  • Support for code-first workflows: Allows users to create without an initial database; you create the classes for your application and then match your data model to the classes, not the other way around.
  • Basic CRUD methods: Basic create, read, update, and delete (CRUD) operations are supported.
  • String and numeric type operators: String and numeric type operators needed for basic CRUD operations will be supported. We anticipate supporting more complex operators in future iterations of the Provider.
  • Embedded documents: The Provider supports embedded documents, making it easier to store related information in the same database record.
  • Class mapping and serialization: Your classes in C# will map to MongoDB in a predictable way, including when working with IDs as well as date and/or time values.
  • LINQ query support: The Provider will support LINQ queries with fluent query syntax.
  • Change tracking: The Provider allows you to track and save changes made to entities with each DbContext instance back to your MongoDB database.

Benefits of using the Provider for EF Core

With the MongoDB Provider for EF Core, C# developers can unlock the full power of MongoDB’s developer data platform to build modern applications while leveraging a familiar API interface, query paradigm (LINQ), and design patterns. Developers looking to modernize their data layer can do so with MongoDB while remaining free from cloud vendor lock-in since MongoDB works with all major cloud providers and for multi-cloud deployments.

How to get started with MongoDB Provider for Entity Framework Core

All you need to do is download the MongoDB Provider for EF Core from the NuGet package manager and build a DbContext that points to a MongoDB Provider instance. The Provider connects to MongoDB and handles the rest, so you can quickly harness the joint value of EF Core and MongoDB.

Conclusion

In this post I have explored Provider for Entity Framework Core and its benefits.

This post is part of MongoDB-Step by step

Back to home page