Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ mongo-community = "MongoDB Community Edition"
mongo-enterprise = "MongoDB Enterprise Edition"
docs-branch = "master" # always set this to the docs branch (i.e. master, 1.7, 1.8, etc.)
version-number = "8.2" # always set this to the driver branch (i.e. 1.7.0, 1.8.0, etc.)
full-version = "{+version-number+}.0"
full-version = "{+version-number+}.1"
version = "v{+version-number+}"
ef-core-version = "8.0"
stable-api = "Stable API"
bool-data-type = "``boolean``"
string-data-type = "``string``"
int-data-type = "``integer``"
not-available = "N/A"
package = "MongoDB.EntityFrameworkCore"
api-root = "https://mongodb.github.io/mongo-efcore-provider/{+full-version+}/api"
driver-api-root = "https://mongodb.github.io/mongo-csharp-driver/3.0.0/api"

[[banners]]
targets = ["index.txt"]
Expand Down
2 changes: 1 addition & 1 deletion source/includes/compatibility-table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
- MongoDB Version

* - **8.1.0 - {+full-version+}**
- **8.0**
- **{+ef-core-version+}**
- **8.0 or later**
- **5.0 or later**
40 changes: 40 additions & 0 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ What's New

Learn what's new in:

* :ref:`Version 8.2 <entity-framework-version-8.2.1>`
* :ref:`Version 8.2 <entity-framework-version-8.2>`
* :ref:`Version 8.1 <entity-framework-version-8.1>`

Expand All @@ -29,6 +30,45 @@ Learn what's new in:
changes to major version releases. Instead, breaking and significant changes
are made in minor version releases.

.. _entity-framework-version-8.2.1:

What's New in 8.2.1
-------------------

The 8.2.1 provider release includes the following new features:

- Adds support for {+framework+}
`shadow properties, <https://learn.microsoft.com/en-us/ef/core/modeling/shadow-properties>`__
properties that aren't defined in your .NET entity class but are
included in the {+framework-core+} model and mapped to the database.

- Adds support for using the
`HasIndex() <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.builders.entitytypebuilder-1.hasindex?view=efcore-{+ef-core-version+}>`__
{+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:

.. code-block:: csharp

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() <{+driver-api-root+}/MongoDB.Driver/MongoDB.Driver.Mql.Exists.html>`__,
`MQL.IsMissing() <{+driver-api-root+}/MongoDB.Driver/MongoDB.Driver.Mql.IsMissing.html>`__,
and `MQL.IsNullOrMissing() <{+driver-api-root+}/MongoDB.Driver/MongoDB.Driver.Mql.IsNullOrMissing.html>`__
methods in LINQ queries. These methods work with both real and shadow properties.

.. _entity-framework-version-8.2:

What's New in 8.2
Expand Down
Loading