@@ -19,6 +19,7 @@ What's New
19
19
20
20
Learn what's new in:
21
21
22
+ * :ref:`Version 8.2 <entity-framework-version-8.2.1>`
22
23
* :ref:`Version 8.2 <entity-framework-version-8.2>`
23
24
* :ref:`Version 8.1 <entity-framework-version-8.1>`
24
25
@@ -29,6 +30,45 @@ Learn what's new in:
29
30
changes to major version releases. Instead, breaking and significant changes
30
31
are made in minor version releases.
31
32
33
+ .. _entity-framework-version-8.2.1:
34
+
35
+ What's New in 8.2.1
36
+ -------------------
37
+
38
+ The 8.2.1 provider release includes the following new features:
39
+
40
+ - Adds support for {+framework+}
41
+ `shadow properties, <https://learn.microsoft.com/en-us/ef/core/modeling/shadow-properties>`__
42
+ properties that aren't defined in your .NET entity class but are
43
+ included in the {+framework-core+} model and mapped to the database.
44
+
45
+ - Adds support for using the
46
+ `HasIndex() <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.builders.entitytypebuilder-1.hasindex?view=efcore-{+ef-core-version+}>`__
47
+ {+framework+} Fluent API method to create indexes for a property when you create
48
+ a database.
49
+
50
+ The following example shows how to specify indexes for the ``Customer.Name``,
51
+ ``Order.OrderRef``, ``Address.ZipCode``, and ``Documents.DocRef`` properties:
52
+
53
+ .. code-block:: csharp
54
+
55
+ var context = MyContext.CreateCollectionOptions(database.MongoDatabase, mb =>
56
+ {
57
+ mb.Entity<Customer>().HasIndex(c => c.Name);
58
+ mb.Entity<Order>().HasIndex(o => o.OrderRef).IsUnique();
59
+ mb.Entity<Address>().HasIndex(o => o.ZipCode, "custom_index_name");
60
+ mb.Entity<Documents>()
61
+ .HasIndex(d => d.DocRef)
62
+ .HasCreateIndexOptions(new CreateIndexOptions { Sparse = true });
63
+ });
64
+
65
+ var result = context.Database.EnsureCreated();
66
+
67
+ - Adds support for the `MQL.Exists() <{+driver-api-root+}/MongoDB.Driver/MongoDB.Driver.Mql.Exists.html>`__,
68
+ `MQL.IsMissing() <{+driver-api-root+}/MongoDB.Driver/MongoDB.Driver.Mql.IsMissing.html>`__,
69
+ and `MQL.IsNullOrMissing() <{+driver-api-root+}/MongoDB.Driver/MongoDB.Driver.Mql.IsNullOrMissing.html>`__
70
+ methods in LINQ queries. These methods work with both real and shadow properties.
71
+
32
72
.. _entity-framework-version-8.2:
33
73
34
74
What's New in 8.2
0 commit comments