From 3a8be65da5cc3b01c1ad30d390043263a5bc075b Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Fri, 13 Nov 2020 13:10:24 +0200 Subject: [PATCH 1/3] Improve consistency when specifying when a feature was introduced --- entity-framework/core/logging-events-diagnostics/index.md | 6 +++--- .../core/logging-events-diagnostics/interceptors.md | 6 +++--- .../core/logging-events-diagnostics/simple-logging.md | 2 +- .../core/managing-schemas/migrations/index.md | 2 +- .../core/managing-schemas/migrations/managing.md | 2 +- .../core/miscellaneous/collations-and-case-sensitivity.md | 2 +- entity-framework/core/modeling/entity-properties.md | 2 +- entity-framework/core/modeling/entity-types.md | 2 +- entity-framework/core/modeling/inheritance.md | 2 +- entity-framework/core/modeling/relationships.md | 6 +++--- entity-framework/core/modeling/shadow-properties.md | 2 +- entity-framework/core/modeling/spatial.md | 2 +- entity-framework/core/modeling/value-comparers.md | 2 +- entity-framework/core/providers/cosmos/index.md | 8 ++++---- .../core/providers/sql-server/azure-sql-database.md | 2 +- entity-framework/core/providers/sql-server/indexes.md | 2 +- entity-framework/core/querying/related-data/eager.md | 2 +- entity-framework/core/querying/single-split-queries.md | 2 +- entity-framework/core/saving/transactions.md | 3 +++ 19 files changed, 30 insertions(+), 27 deletions(-) diff --git a/entity-framework/core/logging-events-diagnostics/index.md b/entity-framework/core/logging-events-diagnostics/index.md index 52592baf12..faf51bb839 100644 --- a/entity-framework/core/logging-events-diagnostics/index.md +++ b/entity-framework/core/logging-events-diagnostics/index.md @@ -27,7 +27,7 @@ The table below provides a quick reference for the differences between the mecha ## Simple logging > [!NOTE] -> This feature was added in EF Core 5.0. +> This feature was introduced in EF Core 5.0. EF Core logs can be accessed from any type of application through the use of [LogTo](https://github.com/dotnet/efcore/blob/ec3df8fd7e4ea4ebeebfa747619cef37b23ab2c6/src/EFCore/DbContextOptionsBuilder.cs#L135) when [configuring a DbContext instance](xref:core/dbcontext-configuration/index). This configuration is commonly done in an override of . For example: @@ -50,7 +50,7 @@ See [Using Microsoft.Extensions.Logging in EF Core](xref:core/logging-events-dia ## Events > [!NOTE] -> Additional events were added in EF Core 5.0. +> Additional events were introduced in EF Core 5.0. EF Core exposes [.NET events](/dotnet/standard/events/) to act as callbacks when certain things happen in the EF Core code. Events are simpler than interceptors and allow more flexible registration. However, they are sync only and so cannot perform non-blocking async I/O. @@ -61,7 +61,7 @@ See [.NET Events in EF Core](xref:core/logging-events-diagnostics/events) for mo ## Interception > [!NOTE] -> This feature was added in EF Core 3.0. Additional interceptors were added in EF Core 5.0. +> This feature was introduced in EF Core 3.0. Additional interceptors were introduced in EF Core 5.0. EF Core interceptors enable interception, modification, and/or suppression of EF Core operations. This includes low-level database operations such as executing a command, as well as higher-level operations, such as calls to SaveChanges. diff --git a/entity-framework/core/logging-events-diagnostics/interceptors.md b/entity-framework/core/logging-events-diagnostics/interceptors.md index 7291b15a0c..bbb9c632fc 100644 --- a/entity-framework/core/logging-events-diagnostics/interceptors.md +++ b/entity-framework/core/logging-events-diagnostics/interceptors.md @@ -51,8 +51,8 @@ Every interceptor instance must implement one or more interface derived from [!NOTE] -> Database interception was added in EF Core 3.0 and is only available for relational database providers. -> Savepoint support was added in EF Core 5.0. +> Database interception was introduced in EF Core 3.0 and is only available for relational database providers. +> Savepoint support was introduced in EF Core 5.0. Low-level database interception is split into the three interfaces shown in the following table. @@ -391,7 +391,7 @@ Notice from the log output that the application continues to use the cached mess ## SaveChanges interception > [!NOTE] -> SaveChanges interception was added in EF Core 5.0. +> SaveChanges interception was introduced in EF Core 5.0. > [!TIP] > You can [download the SaveChanges interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/SaveChangesInterception) from GitHub. diff --git a/entity-framework/core/logging-events-diagnostics/simple-logging.md b/entity-framework/core/logging-events-diagnostics/simple-logging.md index 0136a33343..08122e2afd 100644 --- a/entity-framework/core/logging-events-diagnostics/simple-logging.md +++ b/entity-framework/core/logging-events-diagnostics/simple-logging.md @@ -9,7 +9,7 @@ uid: core/logging-events-diagnostics/simple-logging # Simple Logging > [!NOTE] -> This feature was added in EF Core 5.0. +> This feature was introduced in EF Core 5.0. > [!TIP] > You can [download this article's sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/SimpleLogging) from GitHub. diff --git a/entity-framework/core/managing-schemas/migrations/index.md b/entity-framework/core/managing-schemas/migrations/index.md index dbd270556d..34785277db 100644 --- a/entity-framework/core/managing-schemas/migrations/index.md +++ b/entity-framework/core/managing-schemas/migrations/index.md @@ -135,7 +135,7 @@ Note that this time, EF detects that the database already exists. In addition, w ### Excluding parts of your model > [!NOTE] -> This feature was added in EF Core 5.0. +> This feature was introduced EF Core 5.0. Sometimes you may want to reference types from another DbContext. This can lead to migration conflicts. To prevent this, exclude the type from the migrations of one of the DbContexts. diff --git a/entity-framework/core/managing-schemas/migrations/managing.md b/entity-framework/core/managing-schemas/migrations/managing.md index 1cd97e5dec..8efda4a424 100644 --- a/entity-framework/core/managing-schemas/migrations/managing.md +++ b/entity-framework/core/managing-schemas/migrations/managing.md @@ -204,7 +204,7 @@ dotnet ef migrations list ### [Visual Studio](#tab/vs) > [!NOTE] -> This command was added in EF Core 5.0. +> This command introduced in EF Core 5.0. ```powershell Get-Migration diff --git a/entity-framework/core/miscellaneous/collations-and-case-sensitivity.md b/entity-framework/core/miscellaneous/collations-and-case-sensitivity.md index 30182deda2..01261b128a 100644 --- a/entity-framework/core/miscellaneous/collations-and-case-sensitivity.md +++ b/entity-framework/core/miscellaneous/collations-and-case-sensitivity.md @@ -8,7 +8,7 @@ uid: core/miscellaneous/collations-and-case-sensitivity # Collations and Case Sensitivity > [!NOTE] -> This feature is introduced in EF Core 5.0. +> This feature was introduced in EF Core 5.0. Text processing in databases can be a complex, and requires more user attention that one would suspect. For one thing, databases vary considerably in how they handle text; for example, while some databases are case-sensitive by default (e.g. Sqlite, PostgreSQL), others are case-insensitive (SQL Server, MySQL). In addition, because of index usage, case-sensitivity and similar aspects can have a far-reaching impact on query performance: while it may be tempting to use `string.Lower` to force a case-insensitive comparison in a case-sensitive database, doing so may prevent your application from using indexes. This page details how to configure case sensitivity, or more generally, collations, and how to do so in an efficient way without compromising query performance. diff --git a/entity-framework/core/modeling/entity-properties.md b/entity-framework/core/modeling/entity-properties.md index 5e6238f00f..f6f44cce03 100644 --- a/entity-framework/core/modeling/entity-properties.md +++ b/entity-framework/core/modeling/entity-properties.md @@ -151,7 +151,7 @@ A property that would be optional by convention can be configured to be required ## Column collations > [!NOTE] -> This feature is introduced in EF Core 5.0. +> This feature was introduced in EF Core 5.0. A collation can be defined on text columns, determining how they are compared and ordered. For example, the following code snippet configures a SQL Server column to be case-insensitive: diff --git a/entity-framework/core/modeling/entity-types.md b/entity-framework/core/modeling/entity-types.md index 993db0c6b1..5c81e65e42 100644 --- a/entity-framework/core/modeling/entity-types.md +++ b/entity-framework/core/modeling/entity-types.md @@ -38,7 +38,7 @@ If you don't want a type to be included in the model, you can exclude it: ### Excluding from migrations > [!NOTE] -> The ability to exclude tables from migrations was added in EF Core 5.0. +> The ability to exclude tables from migrations was introduced in EF Core 5.0. It is sometimes useful to have the same entity type mapped in multiple `DbContext` types. This is especially true when using [bounded contexts](https://www.martinfowler.com/bliki/BoundedContext.html), for which it is common to have a different `DbContext` type for each bounded context. diff --git a/entity-framework/core/modeling/inheritance.md b/entity-framework/core/modeling/inheritance.md index 22b3529738..77b253396e 100644 --- a/entity-framework/core/modeling/inheritance.md +++ b/entity-framework/core/modeling/inheritance.md @@ -58,7 +58,7 @@ By default, when two sibling entity types in the hierarchy have a property with ## Table-per-type configuration > [!NOTE] -> The table-per-type (TPT) is a new feature in EF Core 5.0. Table-per-concrete-type (TPC) is supported by EF6, but is not yet supported by EF Core. +> The table-per-type (TPT) feature was introduced in EF Core 5.0. Table-per-concrete-type (TPC) is supported by EF6, but is not yet supported by EF Core. In the TPT mapping pattern, all the types are mapped to individual tables. Properties that belong solely to a base type or derived type are stored in a table that maps to that type. Tables that map to derived types also store a foreign key that joins the derived table with the base table. diff --git a/entity-framework/core/modeling/relationships.md b/entity-framework/core/modeling/relationships.md index d93e41d9b8..0ed403e6e3 100644 --- a/entity-framework/core/modeling/relationships.md +++ b/entity-framework/core/modeling/relationships.md @@ -143,7 +143,7 @@ If you only have one navigation property then there are parameterless overloads ### Configuring navigation properties > [!NOTE] -> This feature was added in EF Core 5.0. +> This feature was introduced in EF Core 5.0. After the navigation property has been created, you may need to further configure it. @@ -263,7 +263,7 @@ With this configuration the columns corresponding to `ShippingAddress` will be m > If you are using [non-nullable reference types](/dotnet/csharp/nullable-references) calling `IsRequired` is not necessary. > [!NOTE] -> The ability to configure whether the dependent is required was added in EF Core 5.0. +> The ability to configure whether the dependent is required was introduced in EF Core 5.0. ### Many-to-many @@ -314,7 +314,7 @@ Additional data can be stored in the join entity type, but for this it's best to [!code-csharp[Main](../../../samples/core/Modeling/FluentAPI/Relationships/ManyToManyPayload.cs?name=ManyToManyPayload)] > [!NOTE] -> The ability to configure many-to-many relationships was added in EF Core 5.0, for previous version use the following approach. +> The ability to configure many-to-many relationships was introduced in EF Core 5.0, for previous version use the following approach. You can also represent a many-to-many relationship by just adding the join entity type and mapping two separate one-to-many relationships. diff --git a/entity-framework/core/modeling/shadow-properties.md b/entity-framework/core/modeling/shadow-properties.md index 7a94e4583e..f6f364a46b 100644 --- a/entity-framework/core/modeling/shadow-properties.md +++ b/entity-framework/core/modeling/shadow-properties.md @@ -57,7 +57,7 @@ If the name supplied to the `IndexerProperty` method matches the name of an exis ## Property bag entity types > [!NOTE] -> Support for Property bag entity types was added in EF Core 5.0. +> Support for Property bag entity types was introduced in EF Core 5.0. Entity types that contain only indexer properties are known as property bag entity types. These entity types don't have shadow properties, instead EF will create indexer properties. Currently only `Dictionary` is supported as a property bag entity type. It must be configured as a shared entity type with a unique name and the corresponding `DbSet` property must be implemented using a `Set` call. diff --git a/entity-framework/core/modeling/spatial.md b/entity-framework/core/modeling/spatial.md index 3ae3ab232f..701bdb5ac6 100644 --- a/entity-framework/core/modeling/spatial.md +++ b/entity-framework/core/modeling/spatial.md @@ -8,7 +8,7 @@ uid: core/modeling/spatial # Spatial Data > [!NOTE] -> This feature was added in EF Core 2.2. +> This feature was introduced in EF Core 2.2. Spatial data represents the physical location and the shape of objects. Many databases provide support for this type of data so it can be indexed and queried alongside other data. Common scenarios include querying for objects within a given distance from a location, or selecting the object whose border contains a given location. EF Core supports mapping to spatial data types using the NetTopologySuite spatial library. diff --git a/entity-framework/core/modeling/value-comparers.md b/entity-framework/core/modeling/value-comparers.md index e1db8a8532..92c999d1c2 100644 --- a/entity-framework/core/modeling/value-comparers.md +++ b/entity-framework/core/modeling/value-comparers.md @@ -9,7 +9,7 @@ uid: core/modeling/value-comparers # Value Comparers > [!NOTE] -> This feature is new in EF Core 3.0. +> This feature was introduced in EF Core 3.0. > [!TIP] > The code in this document can be found on GitHub as a [runnable sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Modeling/ValueConversions/). diff --git a/entity-framework/core/providers/cosmos/index.md b/entity-framework/core/providers/cosmos/index.md index 7a55ce112b..b5d6323d9d 100644 --- a/entity-framework/core/providers/cosmos/index.md +++ b/entity-framework/core/providers/cosmos/index.md @@ -8,7 +8,7 @@ uid: core/providers/cosmos/index # EF Core Azure Cosmos DB Provider > [!NOTE] -> This provider is new in EF Core 3.0. +> This provider was introduced in EF Core 3.0. This database provider allows Entity Framework Core to be used with Azure Cosmos DB. The provider is maintained as part of the [Entity Framework Core Project](https://github.com/dotnet/efcore). @@ -67,7 +67,7 @@ It is also possible to configure the Cosmos DB provider with a single connection [!code-csharp[Configuration](../../../../samples/core/Cosmos/ModelBuilding/OptionsContext.cs?name=Configuration)] > [!NOTE] -> Most of these options are new in EF Core Cosmos 5.0. +> Most of these options were introduced in EF Core 5.0. > [!TIP] > See the [Azure Cosmos DB Options documentation](/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions) for a detailed description of the effect of each option mentioned above. @@ -102,7 +102,7 @@ Once configured the partition key property should always have a non-null value. [!code-csharp[PartitionKey](../../../../samples/core/Cosmos/ModelBuilding/Sample.cs?name=PartitionKey&highlight=15)] > [!NOTE] -> `WithPartitionKey` was added in EF Core 5.0. +> `WithPartitionKey` was introduced in EF Core 5.0. It is generally recommended to add the partition key to the primary key as that best reflects the server semantics and allows some optimizations, for example in `FindAsync`. @@ -204,7 +204,7 @@ This is the resulting JSON: ## Optimistic concurrency with eTags > [!NOTE] -> Support for eTag concurrency was added in EF Core 5.0. +> Support for eTag concurrency was introduced in EF Core 5.0. To configure an entity type to use [optimistic concurrency](xref:core/modeling/concurrency) call `UseETagConcurrency`. This call will create an `_etag` property in [shadow state](xref:core/modeling/shadow-properties) and set it as the concurrency token. diff --git a/entity-framework/core/providers/sql-server/azure-sql-database.md b/entity-framework/core/providers/sql-server/azure-sql-database.md index 2fc31d17e8..85b117ba82 100644 --- a/entity-framework/core/providers/sql-server/azure-sql-database.md +++ b/entity-framework/core/providers/sql-server/azure-sql-database.md @@ -8,7 +8,7 @@ uid: core/providers/sql-server/azure-sql-database # Specifying Azure SQL Database Options >[!NOTE] -> This API is new in EF Core 3.1. +> This API was introduced in EF Core 3.1. Azure SQL Database provides [a variety of pricing options](https://azure.microsoft.com/pricing/details/sql-database/single/) that are usually configured through the Azure Portal. However if you are managing the schema using [EF Core migrations](xref:core/managing-schemas/migrations/index) you can specify the desired options in the model itself. diff --git a/entity-framework/core/providers/sql-server/indexes.md b/entity-framework/core/providers/sql-server/indexes.md index cc85ee6313..86c14e83a5 100644 --- a/entity-framework/core/providers/sql-server/indexes.md +++ b/entity-framework/core/providers/sql-server/indexes.md @@ -22,7 +22,7 @@ You can configure an index or key to be clustered as follows: ## Fill factor > [!NOTE] -> This feature is introduced in EF Core 5.0. +> This feature was introduced in EF Core 5.0. The index fill-factor option is provided for fine-tuning index data storage and performance. For more information, see [the SQL Server documentation on fill factor](/sql/relational-databases/indexes/specify-fill-factor-for-an-index). diff --git a/entity-framework/core/querying/related-data/eager.md b/entity-framework/core/querying/related-data/eager.md index 9ce1bf0de0..3e4ce44802 100644 --- a/entity-framework/core/querying/related-data/eager.md +++ b/entity-framework/core/querying/related-data/eager.md @@ -44,7 +44,7 @@ You may want to include multiple related entities for one of the entities that i ## Filtered include > [!NOTE] -> This feature is introduced in EF Core 5.0. +> This feature was introduced in EF Core 5.0. When applying Include to load related data, you can add certain enumerable operations to the included collection navigation, which allows for filtering and sorting of the results. diff --git a/entity-framework/core/querying/single-split-queries.md b/entity-framework/core/querying/single-split-queries.md index 7f707c9270..aa081795f5 100644 --- a/entity-framework/core/querying/single-split-queries.md +++ b/entity-framework/core/querying/single-split-queries.md @@ -23,7 +23,7 @@ If a typical blog has multiple related posts, rows for these posts will duplicat ## Split queries > [!NOTE] -> This feature is introduced in EF Core 5.0. It only works when using `Include`. [This issue](https://github.com/dotnet/efcore/issues/21234) is tracking support for split query when loading related data in projection without `Include`. +> This feature was introduced in EF Core 5.0. It only works when using `Include`. [This issue](https://github.com/dotnet/efcore/issues/21234) is tracking support for split query when loading related data in projection without `Include`. EF allows you to specify that a given LINQ query should be *split* into multiple SQL queries. Instead of JOINs, split queries generate an additional SQL query for each included collection navigation: diff --git a/entity-framework/core/saving/transactions.md b/entity-framework/core/saving/transactions.md index 46ab680fcf..0f1e2068c2 100644 --- a/entity-framework/core/saving/transactions.md +++ b/entity-framework/core/saving/transactions.md @@ -28,6 +28,9 @@ While all relational database providers support transactions, other providers ty ## Savepoints +> [!NOTE] +> This feature was introduced in EF Core 5.0. + When `SaveChanges` is invoked and a transaction is already in progress on the context, EF automatically creates a *savepoint* before saving any data. Savepoints are points within a database transaction which may later be rolled back to, if an error occurs or for any other reason. If `SaveChanges` encounters any error, it automatically rolls the transaction back to the savepoint, leaving the transaction in the same state as if it had never started. This allows you to possibly correct issues and retry saving, in particular when [optimistic concurrency](xref:core/saving/concurrency) issues occur. It's also possible to manually manage savepoints, just as it is with transactions. The following example creates a savepoint within a transaction, and rolls back to it on failure: From 823d23bef4d8a511e549e61e7a95693eee205fd6 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Fri, 13 Nov 2020 15:50:42 +0200 Subject: [PATCH 2/3] Add missing word --- entity-framework/core/managing-schemas/migrations/managing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity-framework/core/managing-schemas/migrations/managing.md b/entity-framework/core/managing-schemas/migrations/managing.md index 8efda4a424..9838abf033 100644 --- a/entity-framework/core/managing-schemas/migrations/managing.md +++ b/entity-framework/core/managing-schemas/migrations/managing.md @@ -204,7 +204,7 @@ dotnet ef migrations list ### [Visual Studio](#tab/vs) > [!NOTE] -> This command introduced in EF Core 5.0. +> This command was introduced in EF Core 5.0. ```powershell Get-Migration From 27a177d9eee708061734c53c48eda33186429d6c Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Fri, 13 Nov 2020 15:53:29 +0200 Subject: [PATCH 3/3] And another --- entity-framework/core/managing-schemas/migrations/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity-framework/core/managing-schemas/migrations/index.md b/entity-framework/core/managing-schemas/migrations/index.md index 34785277db..ccc6223b15 100644 --- a/entity-framework/core/managing-schemas/migrations/index.md +++ b/entity-framework/core/managing-schemas/migrations/index.md @@ -135,7 +135,7 @@ Note that this time, EF detects that the database already exists. In addition, w ### Excluding parts of your model > [!NOTE] -> This feature was introduced EF Core 5.0. +> This feature was introduced EF in Core 5.0. Sometimes you may want to reference types from another DbContext. This can lead to migration conflicts. To prevent this, exclude the type from the migrations of one of the DbContexts.