Microsoft.EntityFrameworkCore.Cosmos 9.0.4

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.

Requires NuGet 3.6 or higher.

dotnet add package Microsoft.EntityFrameworkCore.Cosmos --version 9.0.4
                    
NuGet\Install-Package Microsoft.EntityFrameworkCore.Cosmos -Version 9.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.EntityFrameworkCore.Cosmos" Version="9.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.EntityFrameworkCore.Cosmos" Version="9.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.EntityFrameworkCore.Cosmos" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.EntityFrameworkCore.Cosmos --version 9.0.4
                    
#r "nuget: Microsoft.EntityFrameworkCore.Cosmos, 9.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Microsoft.EntityFrameworkCore.Cosmos&version=9.0.4
                    
Install Microsoft.EntityFrameworkCore.Cosmos as a Cake Addin
#tool nuget:?package=Microsoft.EntityFrameworkCore.Cosmos&version=9.0.4
                    
Install Microsoft.EntityFrameworkCore.Cosmos as a Cake Tool

Microsoft.EntityFrameworkCore.Cosmos is the EF Core database provider package for Azure Cosmos DB.

Usage

Call the UseCosmos method to choose the Azure Cosmos DB database provider for your DbContext. For example:

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    => optionsBuilder.UseCosmos(
        "https://localhost:8081",
        "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
        databaseName: "OrdersDB");

Getting started with EF Core

See Getting started with EF Core for more information about EF NuGet packages, including which to install when getting started.

Additional documentation

See Microsoft SQL Server EF Core Database Provider for more information about the features of this database provider.

Feedback

If you encounter a bug or issues with this package,you can open an Github issue. For more details, see getting support.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (45)

Showing the top 5 NuGet packages that depend on Microsoft.EntityFrameworkCore.Cosmos:

Package Downloads
Service.Extensions.EntityFramework.Cosmos

Extensions to provide consistent configurations and patterns for your service.

EntityFrameworkCore.Initialization

Extension methods which allow each DbContext to be initialized & destroyed independently based on its Model.

Aspire.Microsoft.EntityFrameworkCore.Cosmos

A Microsoft Azure Cosmos DB provider for Entity Framework Core that integrates with Aspire, including connection pooling, logging, and telemetry.

AspNetCore.Identity.CosmosDb

A Cosmos DB implementation of ASP.NET Core Identity.

EaCloud.EntityFrameworkCore.Cosmos

Azure Cosmos DB 组件,封装基于 Microsoft.EntityFrameworkCore.Cosmos 的数据访问功能的实现(受限于只能使用SQL类型数据库,不建议使用)。

GitHub repositories (12)

Showing the top 12 popular GitHub repositories that depend on Microsoft.EntityFrameworkCore.Cosmos:

Repository Stars
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
masastack/MASA.Framework
.NET next-generation microservice development framework, which provides cloud native best practices based on Dapr.
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
Jcparkyn/nodexr
Graphical regular expression editor
JonPSmith/EfCore.TestSupport
Tools for helping in unit testing applications that use Entity Framework Core
okyrylchuk/dotnet6_features
ProfessionalCSharp/ProfessionalCSharp2021
Source code for Professional C# and .NET 2021 Edition (with updates for C# 11 and .NET 7)
ProfessionalCSharp/MoreSamples
Additional code samples the book series Professional C#, Wrox Press
microsoft/TailwindTraders-Backend
Tailwind Traders Backend Services
Azure/azure-mobile-apps
Build better mobile applications using Azure Mobile Apps
CommunityToolkit/Datasync
A collection of libraries that implement a client-server system used for synchronizing data from a cloud-based database.
PacktPublishing/Software-Architecture-with-C-Sharp-12-and-.NET-8-4E
Code Repository for Software Architecture with .NET 8 Fourth Edition, Published by Packt
Version Downloads Last updated
10.0.0-preview.3.25171.6 182 4/10/2025
10.0.0-preview.2.25163.8 193 3/18/2025
10.0.0-preview.1.25081.1 203 2/25/2025
9.0.4 7,550 4/8/2025
9.0.3 27,653 3/11/2025
9.0.2 67,871 2/11/2025
9.0.1 61,220 1/14/2025
9.0.0 105,225 11/12/2024
9.0.0-rc.2.24474.1 7,430 10/8/2024
9.0.0-rc.1.24451.1 1,646 9/10/2024
9.0.0-preview.7.24405.3 1,570 8/13/2024
9.0.0-preview.6.24327.4 318 7/9/2024
9.0.0-preview.5.24306.3 381 6/11/2024
9.0.0-preview.4.24267.1 3,954 5/21/2024
9.0.0-preview.3.24172.4 2,057 4/11/2024
9.0.0-preview.2.24128.4 207 3/12/2024
9.0.0-preview.1.24081.2 505 2/13/2024
8.0.15 5,077 4/8/2025
8.0.14 17,456 3/11/2025
8.0.13 31,162 2/11/2025
8.0.12 45,126 1/14/2025
8.0.11 213,327 11/12/2024
8.0.10 208,721 10/8/2024
8.0.8 446,888 8/13/2024
8.0.7 282,601 7/9/2024
8.0.6 256,294 5/28/2024
8.0.5 80,600 5/14/2024
8.0.4 280,349 4/9/2024
8.0.3 204,627 3/12/2024
8.0.2 117,328 2/13/2024
8.0.1 174,910 1/9/2024
8.0.0 277,929 11/14/2023
8.0.0-rc.2.23480.1 9,446 10/10/2023
8.0.0-rc.1.23419.6 7,851 9/12/2023
8.0.0-preview.7.23375.4 714 8/8/2023
8.0.0-preview.6.23329.4 795 7/11/2023
8.0.0-preview.5.23280.1 827 6/13/2023
8.0.0-preview.4.23259.3 836 5/16/2023
8.0.0-preview.3.23174.2 1,386 4/11/2023
8.0.0-preview.2.23128.3 827 3/14/2023
8.0.0-preview.1.23111.4 4,327 2/21/2023
7.0.20 23,867 5/28/2024
7.0.19 2,520 5/14/2024
7.0.18 8,739 4/9/2024
7.0.17 32,595 3/12/2024
7.0.16 16,011 2/13/2024
7.0.15 23,416 1/9/2024
7.0.14 47,157 11/14/2023
7.0.13 154,677 10/24/2023
7.0.12 60,639 10/10/2023
7.0.11 69,980 9/12/2023
7.0.10 75,813 8/8/2023
7.0.9 94,058 7/11/2023
7.0.8 65,139 6/22/2023
7.0.7 21,353 6/13/2023
7.0.5 216,612 4/11/2023
7.0.4 170,956 3/14/2023
7.0.3 81,561 2/14/2023
7.0.2 162,960 1/10/2023
7.0.1 74,171 12/13/2022
7.0.0 102,411 11/7/2022
7.0.0-rc.2.22472.11 4,342 10/11/2022
7.0.0-rc.1.22426.7 1,087 9/14/2022
7.0.0-preview.7.22376.2 1,910 8/9/2022
7.0.0-preview.6.22329.4 629 7/12/2022
7.0.0-preview.5.22302.2 854 6/14/2022
7.0.0-preview.4.22229.2 901 5/10/2022
7.0.0-preview.3.22175.1 573 4/13/2022
7.0.0-preview.2.22153.1 459 3/14/2022
7.0.0-preview.1.22076.6 439 2/17/2022
6.0.36 47,600 11/12/2024
6.0.35 8,102 10/8/2024
6.0.33 4,614 8/13/2024
6.0.32 2,426 7/9/2024
6.0.31 10,980 5/28/2024
6.0.30 2,230 5/14/2024
6.0.29 46,826 4/9/2024
6.0.28 15,738 3/12/2024
6.0.27 17,750 2/13/2024
6.0.26 26,991 1/9/2024
6.0.25 37,231 11/14/2023
6.0.24 18,591 10/24/2023
6.0.23 5,293 10/10/2023
6.0.22 29,074 9/12/2023
6.0.21 44,792 8/8/2023
6.0.20 30,002 7/11/2023
6.0.19 23,232 6/22/2023
6.0.18 9,033 6/13/2023
6.0.16 84,158 4/11/2023
6.0.15 67,703 3/14/2023
6.0.14 78,553 2/14/2023
6.0.13 39,345 1/10/2023
6.0.12 28,160 12/13/2022
6.0.11 92,436 11/7/2022
6.0.10 412,293 10/11/2022
6.0.9 841,364 9/13/2022
6.0.8 289,002 8/9/2022
6.0.7 190,164 7/12/2022
6.0.6 152,879 6/14/2022
6.0.5 198,120 5/10/2022
6.0.4 166,854 4/11/2022
6.0.3 304,701 3/8/2022
6.0.2 157,858 2/8/2022
6.0.1 452,835 12/14/2021
6.0.0 212,527 11/8/2021
6.0.0-rc.2.21480.5 12,538 10/12/2021
6.0.0-rc.1.21452.10 1,912 9/14/2021
6.0.0-preview.7.21378.4 561 8/10/2021
6.0.0-preview.6.21352.1 348 7/14/2021
6.0.0-preview.5.21301.9 4,111 6/15/2021
6.0.0-preview.4.21253.1 1,874 5/24/2021
6.0.0-preview.3.21201.2 863 4/8/2021
6.0.0-preview.2.21154.2 476 3/11/2021
6.0.0-preview.1.21102.2 646 2/12/2021
5.0.17 25,347 5/10/2022 5.0.17 is deprecated because it is no longer maintained.
5.0.16 3,804 4/11/2022 5.0.16 is deprecated because it is no longer maintained.
5.0.15 7,855 3/8/2022 5.0.15 is deprecated because it is no longer maintained.
5.0.14 12,048 2/8/2022 5.0.14 is deprecated because it is no longer maintained.
5.0.13 44,869 12/14/2021 5.0.13 is deprecated because it is no longer maintained.
5.0.12 19,107 11/7/2021 5.0.12 is deprecated because it is no longer maintained.
5.0.11 49,667 10/12/2021 5.0.11 is deprecated because it is no longer maintained.
5.0.10 55,413 9/14/2021 5.0.10 is deprecated because it is no longer maintained.
5.0.9 48,663 8/10/2021 5.0.9 is deprecated because it is no longer maintained.
5.0.8 40,763 7/13/2021 5.0.8 is deprecated because it is no longer maintained.
5.0.7 52,253 6/8/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 52,480 5/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 53,342 4/6/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 31,225 3/9/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 57,119 2/9/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 54,314 1/12/2021 5.0.2 is deprecated because it is no longer maintained.
5.0.1 266,838 12/8/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 44,425 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.6 3,631 10/13/2020
5.0.0-rc.1.20451.13 2,073 9/14/2020
5.0.0-preview.8.20407.4 436 8/25/2020
5.0.0-preview.7.20365.15 712 7/21/2020
5.0.0-preview.6.20312.4 805 6/25/2020
5.0.0-preview.5.20278.2 2,185 6/10/2020
5.0.0-preview.4.20220.10 1,325 5/18/2020
5.0.0-preview.3.20181.2 3,367 4/23/2020
5.0.0-preview.2.20159.4 4,093 4/2/2020
5.0.0-preview.2.20120.8 3,369 3/16/2020
3.1.32 15,484 12/13/2022
3.1.31 2,231 11/8/2022
3.1.30 730 10/11/2022
3.1.29 1,889 9/13/2022
3.1.28 13,672 8/9/2022
3.1.27 5,267 7/12/2022
3.1.26 2,624 6/14/2022
3.1.25 4,922 5/10/2022
3.1.24 3,376 4/11/2022
3.1.23 28,130 3/8/2022
3.1.22 17,417 12/14/2021
3.1.21 57,334 11/7/2021
3.1.20 8,308 10/11/2021
3.1.19 12,679 9/14/2021
3.1.18 25,127 8/10/2021
3.1.17 29,436 7/13/2021
3.1.16 77,032 6/8/2021
3.1.15 19,031 5/11/2021
3.1.14 10,178 4/6/2021
3.1.13 27,843 3/9/2021
3.1.12 89,610 2/9/2021
3.1.11 39,180 1/12/2021
3.1.10 74,201 11/9/2020
3.1.9 66,345 10/13/2020
3.1.8 91,191 9/8/2020
3.1.7 48,116 8/11/2020
3.1.6 89,396 7/14/2020
3.1.5 46,675 6/9/2020
3.1.4 61,223 5/12/2020
3.1.3 166,081 3/24/2020
3.1.2 56,625 2/19/2020
3.1.1 44,380 1/14/2020
3.1.0 48,941 12/3/2019
3.1.0-preview3.19554.8 1,107 11/13/2019
3.1.0-preview2.19525.5 1,715 11/1/2019
3.1.0-preview1.19506.2 1,208 10/15/2019
3.0.3 1,119 2/19/2020
3.0.2 826 1/14/2020
3.0.1 5,951 11/18/2019
3.0.0 311,790 9/23/2019
3.0.0-rc1.19456.14 771 9/16/2019
3.0.0-preview9.19423.6 706 9/4/2019
3.0.0-preview8.19405.11 4,344 8/13/2019
3.0.0-preview7.19362.6 668 7/23/2019
3.0.0-preview6.19304.10 1,894 6/12/2019
3.0.0-preview5.19227.1 3,446 5/6/2019
3.0.0-preview4.19216.3 1,480 4/18/2019
3.0.0-preview3.19153.1 2,011 3/6/2019
3.0.0-preview.19074.3 1,370 1/29/2019
3.0.0-preview.18572.1 1,316 12/3/2018
2.2.0-preview3-35497 48,916 10/17/2018