Docs Menu
Docs Home
/ / /
EF Core Provider

What's New

On this page

  • What's New in 8.2.1
  • What's New in 8.2
  • What's New in 8.1

Learn what's new in:

  • Version 8.2

  • Version 8.2

  • Version 8.1

Important

To ensure that the provider major version number aligns with Entity Framework Core versions, the MongoDB Entity Framework Core Provider does not limit breaking changes to major version releases. Instead, breaking and significant changes are made in minor version releases.

The 8.2.1 provider release includes the following new features:

  • Adds support for Entity Framework shadow properties, properties that aren't defined in your .NET entity class but are included in the Entity Framework Core model and mapped to the database.

  • Adds support for using the HasIndex() Entity Framework Fluent API method to create indexes for a property when you create a database.

    The following example shows how to specify indexes for the Customer.Name, Order.OrderRef, Address.ZipCode, and Documents.DocRef properties:

    var context = MyContext.CreateCollectionOptions(database.MongoDatabase, mb =>
    {
    mb.Entity<Customer>().HasIndex(c => c.Name);
    mb.Entity<Order>().HasIndex(o => o.OrderRef).IsUnique();
    mb.Entity<Address>().HasIndex(o => o.ZipCode, "custom_index_name");
    mb.Entity<Documents>()
    .HasIndex(d => d.DocRef)
    .HasCreateIndexOptions(new CreateIndexOptions { Sparse = true });
    });
    var result = context.Database.EnsureCreated();
  • Adds support for the MQL.Exists(), MQL.IsMissing(), and MQL.IsNullOrMissing() methods in LINQ queries. These methods work with both real and shadow properties.

The 8.2 provider release includes the following new features:

  • Adds support for type discriminators

  • Adds support for v3.0 of the MongoDB .NET/C# Driver

  • Adds support for TimeOnly and DateOnly CLR types

Warning

Breaking Changes

The v8.1 provider introduces the following breaking changes:

  • The EF Core Provider runs all changes as MongoDB transactions. If your application uses a MongoDB Server version earlier than v5.0, or does not run in a replica set, you must reconfigure your application.

  • Changed the default GUID storage format from CSharpLegacy binary format to Standard format.

  • Modified the IMongoClientWrapper interface to provide service registration for the MongoClientWrapper class. You should not implement the IMongoClientWrapper interface in your application.

  • The CamelCaseElementNameConvention cases owned entities based on their property name instead of their class name.

For more information about these breaking changes, see Version 8.1.0 Breaking Changes in the Upgrade Provider Version guide.

The 8.1 provider release includes the following new features:

  • Support for optimistic concurrency through the following:

    • IsConcurrencyToken() method or the ConcurrencyCheck() attribute

    • IsRowVersion() method or the Timestamp attribute

  • Support for mapping Dictionary and ReadOnlyDictionary properties

For more information about this release, see the v8.1.0 release notes.

Back

FAQ