What's New
Learn what's new in:
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.
What's New in 8.2.1
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
, andDocuments.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.
What's New in 8.2
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
andDateOnly
CLR types
What's New in 8.1
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 toStandard
format.Modified the
IMongoClientWrapper
interface to provide service registration for theMongoClientWrapper
class. You should not implement theIMongoClientWrapper
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 theConcurrencyCheck()
attributeIsRowVersion()
method or theTimestamp
attribute
Support for mapping
Dictionary
andReadOnlyDictionary
properties
For more information about this release, see the v8.1.0 release notes.