From 1a75ff5c9ee96b5835599ccfe988105e43fdb3ef Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:48:14 -0600 Subject: [PATCH 1/4] patch bump --- snooty.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snooty.toml b/snooty.toml index 6fc6c00..d8d9fce 100644 --- a/snooty.toml +++ b/snooty.toml @@ -29,7 +29,7 @@ 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+}" stable-api = "Stable API" bool-data-type = "``boolean``" From 705c570a709fbd943d77895664400ac51c70742a Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:44:51 -0600 Subject: [PATCH 2/4] first draft --- snooty.toml | 2 ++ source/includes/compatibility-table.rst | 2 +- source/whats-new.txt | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/snooty.toml b/snooty.toml index d8d9fce..ce00b0c 100644 --- a/snooty.toml +++ b/snooty.toml @@ -31,6 +31,7 @@ docs-branch = "master" version-number = "8.2" # always set this to the driver branch (i.e. 1.7.0, 1.8.0, etc.) 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``" @@ -38,6 +39,7 @@ 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"] diff --git a/source/includes/compatibility-table.rst b/source/includes/compatibility-table.rst index a16742c..7ae363e 100644 --- a/source/includes/compatibility-table.rst +++ b/source/includes/compatibility-table.rst @@ -8,6 +8,6 @@ - MongoDB Version * - **8.1.0 - {+full-version+}** - - **8.0** + - **{+ef-core-version+}** - **8.0 or later** - **5.0 or later** \ No newline at end of file diff --git a/source/whats-new.txt b/source/whats-new.txt index f132605..75f86ac 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -19,6 +19,7 @@ What's New Learn what's new in: +* :ref:`Version 8.2 ` * :ref:`Version 8.2 ` * :ref:`Version 8.1 ` @@ -29,6 +30,26 @@ 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, `__ + 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 creating indexes on one or more properties when you call the + ``CreateDatabase()`` or ``CreateDatabaseAsync()`` method. + +- 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 From b3804ed6b91c022ac45febad79294d583eb14787 Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:49:45 -0600 Subject: [PATCH 3/4] feedback --- source/whats-new.txt | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 75f86ac..64ee43d 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -42,8 +42,27 @@ The 8.2.1 provider release includes the following new features: 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 creating indexes on one or more properties when you call the - ``CreateDatabase()`` or ``CreateDatabaseAsync()`` method. +- Adds support for using the + `HasIndex() `__ + {+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().HasIndex(c => c.Name); + mb.Entity().HasIndex(o => o.OrderRef).IsUnique(); + mb.Entity
().HasIndex(o => o.ZipCode, "custom_index_name"); + mb.Entity() + .HasIndex(d => d.DocRef) + .HasCreateIndexOptions(new CreateIndexOptions { Sparse = true }); + }); + + var result = client.CreateDatabase(context.GetService()); - 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>`__, From 7318aa8dd4b4a527e91094f569c295046b9b51f0 Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:29:23 -0600 Subject: [PATCH 4/4] feedback --- source/whats-new.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 64ee43d..462b82d 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -62,7 +62,7 @@ The 8.2.1 provider release includes the following new features: .HasCreateIndexOptions(new CreateIndexOptions { Sparse = true }); }); - var result = client.CreateDatabase(context.GetService()); + 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>`__,