From 43bde61b2e170c04988bb0905b54732fc1db321e Mon Sep 17 00:00:00 2001 From: Arthur Vickers Date: Thu, 19 Jan 2023 14:40:31 +0000 Subject: [PATCH 1/3] [BULK] DocuTune - Rebranding of Azure Cosmos DB APIs --- CONTRIBUTING.md | 2 +- .../core/modeling/owned-entities.md | 2 +- entity-framework/core/modeling/sequences.md | 2 +- .../core/providers/cosmos/index.md | 14 +++---- .../core/providers/cosmos/limitations.md | 2 +- .../providers/cosmos/unstructured-data.md | 4 +- .../core/providers/writing-a-provider.md | 6 +-- .../core/querying/database-functions.md | 2 +- .../core/testing/testing-with-the-database.md | 2 +- .../core/what-is-new/ef-core-3.x/index.md | 6 +-- .../ef-core-5.0/breaking-changes.md | 16 ++++---- .../core/what-is-new/ef-core-5.0/plan.md | 10 ++--- .../core/what-is-new/ef-core-5.0/whatsnew.md | 12 +++--- .../ef-core-6.0/breaking-changes.md | 10 ++--- .../core/what-is-new/ef-core-6.0/plan.md | 8 ++-- .../core/what-is-new/ef-core-6.0/whatsnew.md | 38 +++++++++---------- .../ef-core-7.0/breaking-changes.md | 4 +- .../core/what-is-new/ef-core-7.0/plan.md | 8 ++-- entity-framework/dotnet-data/index.yml | 6 +-- entity-framework/index.yml | 2 +- entity-framework/toc.yml | 4 +- 21 files changed, 80 insertions(+), 80 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 986811b6e4..adb47345e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,7 +59,7 @@ To highlight selected lines in a rendered snippet (usually renders as yellow bac ## Test your changes with DocFX -Test your changes with the [DocFX command-line tool](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool), which creates a locally hosted version of the site. DocFX doesn't render style and site extensions created for Microsoft Docs. +Test your changes with the [DocFX command-line tool](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool), which creates a locally hosted version of the site. DocFX doesn't render style and site extensions created for Microsoft Learn. DocFX requires the .NET Framework on Windows, or Mono for Linux or macOS. diff --git a/entity-framework/core/modeling/owned-entities.md b/entity-framework/core/modeling/owned-entities.md index 304371a3be..d8e22d9367 100644 --- a/entity-framework/core/modeling/owned-entities.md +++ b/entity-framework/core/modeling/owned-entities.md @@ -13,7 +13,7 @@ Owned entities are essentially a part of the owner and cannot exist without it, ## Configuring types as owned -In most providers, entity types are never configured as owned by convention - you must explicitly use the `OwnsOne` method in `OnModelCreating` or annotate the type with `OwnedAttribute` to configure the type as owned. The Azure Cosmos DB provider is an exception to this. Because Cosmos DB is a document database, the provider configures all related entity types as owned by default. +In most providers, entity types are never configured as owned by convention - you must explicitly use the `OwnsOne` method in `OnModelCreating` or annotate the type with `OwnedAttribute` to configure the type as owned. The Azure Cosmos DB provider is an exception to this. Because Azure Cosmos DB is a document database, the provider configures all related entity types as owned by default. In this example, `StreetAddress` is a type with no identity property. It is used as a property of the Order type to specify the shipping address for a particular order. diff --git a/entity-framework/core/modeling/sequences.md b/entity-framework/core/modeling/sequences.md index 7fb62ea3bc..b4a5c193eb 100644 --- a/entity-framework/core/modeling/sequences.md +++ b/entity-framework/core/modeling/sequences.md @@ -8,7 +8,7 @@ uid: core/modeling/sequences # Sequences > [!NOTE] -> Sequences are a feature typically supported only by relational databases. If you're using a non-relational database such as Cosmos, check your database documentation on generating unique values. +> Sequences are a feature typically supported only by relational databases. If you're using a non-relational database such as Azure Cosmos DB, check your database documentation on generating unique values. A sequence generates unique, sequential numeric values in the database. Sequences are not associated with a specific table, and multiple tables can be set up to draw values from the same sequence. diff --git a/entity-framework/core/providers/cosmos/index.md b/entity-framework/core/providers/cosmos/index.md index 8880a4fc0e..e9b4c0f826 100644 --- a/entity-framework/core/providers/cosmos/index.md +++ b/entity-framework/core/providers/cosmos/index.md @@ -1,6 +1,6 @@ --- title: Azure Cosmos DB Provider - EF Core -description: Documentation for the database provider that allows Entity Framework Core to be used with the Azure Cosmos DB SQL API +description: Documentation for the database provider that allows Entity Framework Core to be used with the Azure Cosmos DB for NoSQL author: AndriySvyryd ms.date: 01/11/2022 uid: core/providers/cosmos/index @@ -12,7 +12,7 @@ This database provider allows Entity Framework Core to be used with Azure Cosmos It is strongly recommended to familiarize yourself with the [Azure Cosmos DB documentation](/azure/cosmos-db/introduction) before reading this section. > [!NOTE] -> This provider only works with the SQL API of Azure Cosmos DB. +> This provider only works with the Azure Cosmos DB for NoSQL of Azure Cosmos DB. ## Install @@ -57,9 +57,9 @@ Saving and querying data follows the normal EF pattern: > [!IMPORTANT] > Calling [EnsureCreatedAsync](/dotnet/api/Microsoft.EntityFrameworkCore.Storage.IDatabaseCreator.EnsureCreatedAsync) is necessary to create the required containers and insert the [seed data](xref:core/modeling/data-seeding) if present in the model. However `EnsureCreatedAsync` should only be called during deployment, not normal operation, as it may cause performance issues. -## Cosmos options +## Azure Cosmos DB options -It is also possible to configure the Cosmos DB provider with a single connection string and to specify other options to customize the connection: +It is also possible to configure the Azure Cosmos DB provider with a single connection string and to specify other options to customize the connection: [!code-csharp[Configuration](../../../../samples/core/Cosmos/ModelBuilding/OptionsContext.cs?name=Configuration)] @@ -84,7 +84,7 @@ If no other entity type will ever be stored in the same container the discrimina ### Partition keys -By default EF Core will create containers with the partition key set to `"__partitionKey"` without supplying any value for it when inserting items. But to fully leverage the performance capabilities of Azure Cosmos a [carefully selected partition key](/azure/cosmos-db/partition-data) should be used. It can be configured by calling [HasPartitionKey](/dotnet/api/Microsoft.EntityFrameworkCore.CosmosEntityTypeBuilderExtensions.HasPartitionKey): +By default EF Core will create containers with the partition key set to `"__partitionKey"` without supplying any value for it when inserting items. But to fully leverage the performance capabilities of Azure Cosmos DB a [carefully selected partition key](/azure/cosmos-db/partition-data) should be used. It can be configured by calling [HasPartitionKey](/dotnet/api/Microsoft.EntityFrameworkCore.CosmosEntityTypeBuilderExtensions.HasPartitionKey): [!code-csharp[PartitionKey](../../../../samples/core/Cosmos/ModelBuilding/OrderContext.cs?name=PartitionKey)] @@ -99,7 +99,7 @@ It is generally recommended to add the partition key to the primary key as that ### Provisioned throughput -If you use EF Core to create the Azure Cosmos database or containers you can configure [provisioned throughput](/azure/cosmos-db/set-throughput) for the database by calling or . For example: +If you use EF Core to create the Azure Cosmos DB database or containers you can configure [provisioned throughput](/azure/cosmos-db/set-throughput) for the database by calling or . For example: [!code-csharp[Model](../../../../samples/core/Miscellaneous/NewInEFCore6.Cosmos/CosmosImplicitOwnershipSample.cs?name=Model)] -In EF Core 5.0, these types would have been modeled for Cosmos with the following configuration: +In EF Core 5.0, these types would have been modeled for Azure Cosmos DB with the following configuration: [!code-csharp[OnModelCreating](../../../../samples/core/Miscellaneous/NewInEFCore6.Cosmos/CosmosImplicitOwnershipSample.cs?name=OnModelCreating)] -The resulting Cosmos documents have the family's parents, children, pets, and address embedded in the family document. For example: +The resulting Azure Cosmos DB documents have the family's parents, children, pets, and address embedded in the family document. For example: ```json { @@ -841,7 +841,7 @@ The resulting Cosmos documents have the family's parents, children, pets, and ad GitHub Issue: [#14762](https://github.com/dotnet/efcore/issues/14762). -EF Core 6.0 natively maps collections of primitive types when using the Cosmos database provider. For example, consider this entity type: +EF Core 6.0 natively maps collections of primitive types when using the Azure Cosmos DB database provider. For example, consider this entity type: [!code-csharp[ViewType](../../../../samples/core/Miscellaneous/NewInEFCore6/ToInMemoryQuerySample.cs?name=ViewType)] -And define an DbSet property for it on the DbContext, along with sets for other top-level entity types: +And define a DbSet property for it on the DbContext, along with sets for other top-level entity types: