From 430c0dec760a2464bbceb642d241da6565dd8f0c Mon Sep 17 00:00:00 2001 From: Diego Vega Date: Sat, 24 Feb 2018 13:19:43 -0800 Subject: [PATCH] Improvements --- .../core/providers/devart/index.md | 49 --------------- entity-framework/core/providers/index.md | 61 +++++++++++-------- .../core/providers/my-cat/index.md | 36 ----------- entity-framework/toc.md | 9 --- 4 files changed, 36 insertions(+), 119 deletions(-) delete mode 100644 entity-framework/core/providers/devart/index.md delete mode 100644 entity-framework/core/providers/my-cat/index.md diff --git a/entity-framework/core/providers/devart/index.md b/entity-framework/core/providers/devart/index.md deleted file mode 100644 index 627521b9b9..0000000000 --- a/entity-framework/core/providers/devart/index.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Devart Database Providers - EF Core -author: rowanmiller -ms.author: divega - -ms.date: 10/27/2016 - -ms.assetid: aad70a75-d04d-4d63-a489-7f9062a3c73d -ms.technology: entity-framework-core - -uid: core/providers/devart/index ---- -# Devart EF Core Database Providers - -Devart is a third party provider writer that offers database providers for a wide range of databases. Find out more at [devart.com/dotconnect](https://www.devart.com/dotconnect/). - -> [!NOTE] -> This provider is not maintained as part of the Entity Framework Core project. When considering a third party provider, be sure to evaluate quality, licensing, support, etc. to ensure they meet your requirements. - -## Paid Versions Only - -Devart dotConnect is a commercial third party provider. Entity Framework support is only available in paid versions of dotConnect. - -## Install - -See the [Devart dotConnect documentation](https://www.devart.com/dotconnect/) for installation instructions. - -## Get Started - -See the [Devart dotConnect Entity Framework documentation](https://www.devart.com/dotconnect/entityframework.html) and [blog article about Entity Framework Core 1 Support](http://blog.devart.com/entity-framework-core-1-entity-framework-7-support.html) to get started. - -## Supported Database Engines - -* MySQL - -* Oracle - -* PostgreSQL - -* SQLite - -* DB2 - -* [Cloud apps](https://www.devart.com/dotconnect/#cloud) - -## Supported Platforms - -* .NET Framework (4.5.1 onwards) -* .NET Core 1.0 and higher (providers for Oracle, MySQL, PostgreSQL, SQLite) diff --git a/entity-framework/core/providers/index.md b/entity-framework/core/providers/index.md index def8921726..27af58ec44 100644 --- a/entity-framework/core/providers/index.md +++ b/entity-framework/core/providers/index.md @@ -2,36 +2,39 @@ title: Database Providers - EF Core author: rowanmiller ms.author: divega - ms.date: 2/23/2018 - ms.assetid: 14fffb6c-a687-4881-a094-af4a1359a296 ms.technology: entity-framework-core - uid: core/providers/index --- # Database Providers -Entity Framework Core uses a provider model to allow EF to be used to access many different databases. Some concepts are common to most databases, and are included in the primary EF Core components. Such concepts include expressing queries in LINQ, transactions, and tacking changes to objects once they are loaded from the database. Some concepts are specific to a particular provider. For example, the SQL Server provider allows you to configure memory-optimized tables (a feature specific to SQL Server). Other concepts are specific to a class of providers. For example, EF Core providers for relational databases build on the common `Microsoft.EntityFrameworkCore.Relational` library, which provides APIs for configuring table and column mappings, foreign key constraints, etc. +Entity Framework Core can access many different databases through plug-in libraries called database providers. -> [!NOTE] +## Current providers +> [!IMPORTANT] > EF Core providers are built by a variety of sources. Not all providers are maintained as part of the Entity Framework Core project. When considering a provider, be sure to evaluate quality, licensing, support, etc. to ensure they meet your requirements. Also make sure you review each provider's documentation for detailed version compatibility information. -| NuGet Package | Supported database engines | Maintainer / Vendor | Supported EF Core versions | Supported .NET implementations |Useful links | -|:------------------------------------------------------------------------------------------------------------------|:---------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Microsoft.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer) | SQL Server (2008 onwards) | [EF Core Project](https://github.com/aspnet/EntityFrameworkCore/)
Microsoft | All | [All](core/platforms/index) |[documentation](xref:core/providers/sql-server/index) | -| [Microsoft.EntityFrameworkCore.Sqlite](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Sqlite) | SQLite (3.7 onwards) | [EF Core Project](https://github.com/aspnet/EntityFrameworkCore/)
Microsoft | All | [All](core/platforms/index) |[documentation](xref:core/providers/sqlite/index) | -| [Microsoft.EntityFrameworkCore.InMemory](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.InMemory) | In-memory database | [EF Core Project](https://github.com/aspnet/EntityFrameworkCore/)
Microsoft | All (for testing only) | [All](core/platforms/index) |[documentation](xref:core/providers/in-memory/index) | -| [Npgsql.EntityFrameworkCore.PostgreSQL](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer) | PostgreSQL | [Npgsql Development Team](https://github.com/npgsql) | All | Framework 4.5.1 onwards, Core (all), Mono 4.2.0 onwards) |[documentation](http://www.npgsql.org/efcore/index.html) | -| [Pomelo.EntityFrameworkCore.MySql](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql) | MySQL, MariaDB | [Pomelo Foundation Project](https://github.com/PomeloFoundation) | All | Framework 4.5.1 onwards, Core (all), Mono 4.2.0 onwards) |[documentation](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/blob/master/README.md#getting-started) | -| [Pomelo.EntityFrameworkCore.MySql](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql) | MySQL, MariaDB | [Pomelo Foundation Project](https://github.com/PomeloFoundation) | All | Framework 4.5.1 onwards, Core (all), Mono 4.2.0 onwards) |[documentation](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/blob/master/README.md#getting-started) | -| [MySql.Data.EntityFrameworkCore](https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore) | MySQL | [MySQL project](http://dev.mysql.com)
Oracle | All | Framework 4.5.1 onwards, Core (all), Mono 4.2.0 onwards) |[documentation](https://dev.mysql.com/doc/connector-net/en/) | -| [EntityFrameworkCore.SqlServerCompact40](https://www.nuget.org/packages/EntityFrameworkCore.SqlServerCompact40) | SQL Server Compact 4.0 | [Erik Ejlskov Jensen](https://github.com/ErikEJ/) | All | Framework 4.5.1 onwards |[documentation](https://github.com/ErikEJ/EntityFramework.SqlServerCompact/wiki/Using-EF-Core-with-SQL-Server-Compact-in-Traditional-.NET-Applications) | -| [EntityFrameworkCore.SqlServerCompact35](https://www.nuget.org/packages/EntityFrameworkCore.SqlServerCompact35) | SQL Server Compact 3.5 | [Erik Ejlskov Jensen](https://github.com/ErikEJ/) | All | Framework 4.5.1 onwards |[documentation](https://github.com/ErikEJ/EntityFramework.SqlServerCompact/wiki/Using-EF-Core-with-SQL-Server-Compact-in-Traditional-.NET-Applications) | -| [EntityFrameworkCore.FirebirdSql](https://www.nuget.org/packages/EntityFrameworkCore.FirebirdSql/) | Firebird SQL versions 2.5 and 3.x | [Rafael Almeida](https://github.com/ralmsdeveloper) | 2.x onwards | Framework 4.5.1 onwards, Core (all), Mono 4.2.0 onwards |[documentation](https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSQL/wiki) | -| [IBM.EntityFrameworkCore](https://www.nuget.org/packages/IBM.EntityFrameworkCore) | zOS, LUW (including dashDB), IBM I, Informix | IBM | Up to 1.1 (on Windows) | Framework 4.6 onwards, Core up to 1.1 |[documentation](https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/DB2DotnetCore?lang=en) | -| [IBM.EntityFrameworkCore-lnx](https://www.nuget.org/packages/IBM.EntityFrameworkCore-lnx) | zOS, LUW (including dashDB), IBM I, Informix | IBM | Up to 1.1 (on Linux) | Core up to 1.1 |[documentation](https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/DB2DotnetCore?lang=en) | +| NuGet Package | Supported database engines | Maintainer / Vendor | Notes | Useful links | +|:------------------------------------------------------------------------------------------------------------------|:---------------------------|:------------------------------------------------------------------------------|:----------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Microsoft.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer) | SQL Server 2008 onwards | [EF Core Project](https://github.com/aspnet/EntityFrameworkCore/) (Microsoft) | | [docs](xref:core/providers/sql-server/index) | +| [Microsoft.EntityFrameworkCore.Sqlite](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Sqlite) | SQLite 3.7 onwards | [EF Core Project](https://github.com/aspnet/EntityFrameworkCore/) (Microsoft) | | [docs](xref:core/providers/sqlite/index) | +| [Microsoft.EntityFrameworkCore.InMemory](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.InMemory) | EF Core in-memory database | [EF Core Project](https://github.com/aspnet/EntityFrameworkCore/) (Microsoft) | For testing only | [docs](xref:core/providers/in-memory/index) | +| [Npgsql.EntityFrameworkCore.PostgreSQL](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer) | PostgreSQL | [Npgsql Development Team](https://github.com/npgsql) | | [docs](http://www.npgsql.org/efcore/index.html) | +| [Pomelo.EntityFrameworkCore.MySql](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql) | MySQL, MariaDB | [Pomelo Foundation Project](https://github.com/PomeloFoundation) | | [readme](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/blob/master/README.md) | +| [Pomelo.EntityFrameworkCore.MyCat](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MyCat) | MyCAT Server | [Pomelo Foundation Project](https://github.com/PomeloFoundation) | Up to EF Core 1.1 | [readme](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MyCat/blob/master/README.md) | +| [EntityFrameworkCore.SqlServerCompact40](https://www.nuget.org/packages/EntityFrameworkCore.SqlServerCompact40) | SQL Server Compact 4.0 | [Erik Ejlskov Jensen](https://github.com/ErikEJ/) | .NET Framework | [wiki](https://github.com/ErikEJ/EntityFramework.SqlServerCompact/wiki/Using-EF-Core-with-SQL-Server-Compact-in-Traditional-.NET-Applications) | +| [EntityFrameworkCore.SqlServerCompact35](https://www.nuget.org/packages/EntityFrameworkCore.SqlServerCompact35) | SQL Server Compact 3.5 | [Erik Ejlskov Jensen](https://github.com/ErikEJ/) | .NET Framework | [wiki](https://github.com/ErikEJ/EntityFramework.SqlServerCompact/wiki/Using-EF-Core-with-SQL-Server-Compact-in-Traditional-.NET-Applications) | +| [MySql.Data.EntityFrameworkCore](https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore) | MySQL | [MySQL project](http://dev.mysql.com) (Oracle) | | [docs](https://dev.mysql.com/doc/connector-net/en/) | +| [EntityFrameworkCore.FirebirdSql](https://www.nuget.org/packages/EntityFrameworkCore.FirebirdSql/) | Firebird 2.5 and 3.x | [Rafael Almeida](https://github.com/ralmsdeveloper) | EF Core 2.0 onwards | [wiki](https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSQL/wiki) | +| [IBM.EntityFrameworkCore](https://www.nuget.org/packages/IBM.EntityFrameworkCore) | Db2, Informix | [IBM](https://ibm.com) | Up to EF Core 1.1, Windows | [FAQ](https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/Instructions_for_downloading_and_using_DB2_NET_Core_provider_package) | +| [IBM.EntityFrameworkCore-lnx](https://www.nuget.org/packages/IBM.EntityFrameworkCore-lnx) | Db2, Informix | [IBM](https://ibm.com) | Up to EF Core 1.1, Linux | [FAQ](https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/Instructions_for_downloading_and_using_DB2_NET_Core_provider_package) | +| [Devart.Data.Oracle.EFCore](https://www.nuget.org/packages/Devart.Data.Oracle.EFCore/) | Oracle 9.2.0.4 onwards | [DevArt](https://www.devart.com/) | Paid | [docs](https://www.devart.com/dotconnect/oracle/docs/) | +| [Devart.Data.PostgreSql.EFCore](https://www.nuget.org/packages/Devart.Data.PostgreSql.EFCore/) | PostgreSQL 8.0 onwards | [DevArt](https://www.devart.com/) | Paid | [docs](https://www.devart.com/dotconnect/postgresql/docs/) | +| [Devart.Data.SQLite.EFCore](https://www.nuget.org/packages/Devart.Data.SQLite.EFCore/) | SQLite 3 onwards | [DevArt](https://www.devart.com/) | Paid | [docs](https://www.devart.com/dotconnect/sqlite/docs/) | +| [Devart.Data.MySql.EFCore](https://www.nuget.org/packages/Devart.Data.MySql.EFCore/) | MySQL 5 onwards | [DevArt](https://www.devart.com/) | Paid | [docs](https://www.devart.com/dotconnect/mysql/docs/) | +| [EntityFrameworkCore.Jet](https://www.nuget.org/packages/EntityFrameworkCore.Jet/) | Microsoft Access files | [Bubi](https://github.com/bubibubi) | EF Core 2.0, .NET Framework | [readme](https://github.com/bubibubi/EntityFrameworkCore.Jet/blob/master/docs/README.md) | ## Future Providers @@ -40,27 +43,35 @@ Entity Framework Core uses a provider model to allow EF to be used to access man We have been developing an EF Core provider for the DocumentDB API in Cosmos DB. This will be the first complete document-oriented database provider we have produced, and the learnings from this exercise are going to inform improvements in the design of the subsequent release after 2.1. The current plan is to publish an early preview of the provider in the 2.1 timeframe. ### Oracle -The Oracle .NET team has announced they are planning to release a provider for EF Core 2.0 approximately in the third quarter of 2018. See their [statement of direction for .NET Core and Entity Framework Core](http://www.oracle.com/technetwork/topics/dotnet/tech-info/odpnet-dotnet-ef-core-sod-4395108.pdf) for more information. +The Oracle .NET team has announced they are planning to release a first-party provider for EF Core 2.0 approximately in the third quarter of 2018. See their [statement of direction for .NET Core and Entity Framework Core](http://www.oracle.com/technetwork/topics/dotnet/tech-info/odpnet-dotnet-ef-core-sod-4395108.pdf) for more information. Please direct any questions about this provider, including the release timeline, to the [Oracle Community Site](https://community.oracle.com/). -In the meanwhile, the EF team has produced a sample EF Core provider for Oracle databases. The purpose of the project is not to produce an EF Core provider owned by Microsoft, but to help us identify gaps in EF Core's relational and base functionality which we need to address in order to better support Oracle, and to jumpstart the development of other Oracle providers for EF Core either by Oracle or third parties. +In the meanwhile, the EF team has produced a [sample EF Core provider for Oracle databases](https://github.com/aspnet/EntityFrameworkCore/blob/dev/samples/OracleProvider/README.md). The purpose of the project is not to produce an EF Core provider owned by Microsoft, but to help us identify gaps in EF Core's relational and base functionality which we need to address in order to better support Oracle, and to jumpstart the development of other Oracle providers for EF Core either by Oracle or third parties. ## Setting up a provider in your application -Providers are usually distributed as NuGet packages. This means they can be installed using the `dotnet` tool in the command line: +Most database providers for EF Core are distributed as NuGet packages. This means they can be installed using the `dotnet` tool in the command line: ``` console -dotnet add package package_name +dotnet add package provider_package_name ``` Or in Visual Studio, using NuGet's Package Manager Console: ``` powershell -install-package package_name +install-package provider_package_name ``` +## Using a database provider in your application + You will then configure the provider in your `DbContext` either using the `OnConfiguring` method or if the `AddDbContext` method if you are using a dependency injection container. E.g. the following line configures the SQL Server provider with the passed connection string: ``` csharp -optionsBuilder.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=MyDatabase;Trusted_Connection=True;"); + optionsBuilder.UseSqlServer("Server=(localdb)\mssqllocaldb;Database=MyDatabase;Trusted_Connection=True;"); ``` + +Database providers can extend EF Core to enable functionality unique to specific databases. Some concepts are common to most databases, and are included in the primary EF Core components. Such concepts include expressing queries in LINQ, transactions, and tacking changes to objects once they are loaded from the database. Some concepts are specific to a particular provider. For example, the SQL Server provider allows you to [configure memory-optimized tables](xref:core/providers/sql-server/memory-optimized-tables) (a feature specific to SQL Server). Other concepts are specific to a class of providers. For example, EF Core providers for relational databases build on the common `Microsoft.EntityFrameworkCore.Relational` library, which provides APIs for configuring table and column mappings, foreign key constraints, etc. +Providers are usually distributed as NuGet packages. + +> [!IMPORTANT] +> When new patches containing bug fixes are released for EF Core, some of the fixes are contained in the `Microsoft.EntityFrameworkCore.Relational` package. It is recommended that you add the latest patched version of this package as a direct dependency if you are using any of the relational database providers. diff --git a/entity-framework/core/providers/my-cat/index.md b/entity-framework/core/providers/my-cat/index.md deleted file mode 100644 index 2fc9a05419..0000000000 --- a/entity-framework/core/providers/my-cat/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Pomelo MyCat Database Provider - EF Core -author: rowanmiller -ms.author: divega -ms.date: 02/27/2017 -ms.assetid: ad798f02-a7a4-45c1-b0a9-8e92f5dc6ff0 -ms.technology: entity-framework-core -uid: core/providers/my-cat/index ---- - -# Pomelo MyCat EF Core Database Provider - -This database provider allows Entity Framework Core to be used with [MyCat](https://github.com/MyCATApache/Mycat-Server). The provider is maintained as part of the [Pomelo Foundation Project](https://github.com/PomeloFoundation/Entity-Framework-Core-MyCat-Proxy). - -> [!NOTE] -> This provider is not maintained as part of the Entity Framework Core project. When considering a third party provider, be sure to evaluate quality, licensing, support, etc. to ensure they meet your requirements. - -## Install - -Download and run [the latest release from the project site](https://github.com/PomeloFoundation/Entity-Framework-Core-MyCat-Proxy/releases). - -## Get Started - -The following resources will help you get started with this provider. - * [Setup steps](https://github.com/aspnet/EntityFramework.Docs/issues/252) - * [Getting started video](https://www.youtube.com/watch?v=q0CXfFNtMZo) - -## Supported Database Engines - -* MyCat - -## Supported Platforms - -* .NET Framework (4.5.1 onwards) -* .NET Core -* Mono (4.2.0 onwards) diff --git a/entity-framework/toc.md b/entity-framework/toc.md index 78a9f14c12..946fd7c602 100644 --- a/entity-framework/toc.md +++ b/entity-framework/toc.md @@ -86,16 +86,7 @@ ##### [Memory-Optimized Tables](core/providers/sql-server/memory-optimized-tables.md) #### [SQLite](core/providers/sqlite/index.md) ##### [SQLite Limitations](core/providers/sqlite/limitations.md) -#### [PostgreSQL (Npgsql)](core/providers/npgsql/index.md) -#### [IBM Data Server (DB2)](core/providers/ibm/index.md) -#### [MySQL (Official)](core/providers/mysql/index.md) -#### [MySQL (Pomelo)](core/providers/pomelo/index.md) -#### [Microsoft SQL Server Compact Edition](core/providers/sql-compact/index.md) #### [InMemory (for Testing)](core/providers/in-memory/index.md) -#### [Devart (MySQL, Oracle, PostgreSQL, SQLite, DB2, and more)](core/providers/devart/index.md) -#### [Oracle (not yet available)](core/providers/oracle/index.md) -#### [MyCat](core/providers/my-cat/index.md) -#### [Firebird-Community](core/providers/firebird-community/index.md) #### [Writing a Database Provider](core/providers/writing-a-provider.md) ### [Managing Database Schemas](core/managing-schemas/index.md)