BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News EF Core Database Providers

EF Core Database Providers

Leia em Português

When EF Core did their big rewrite between the 1.x series and 2.0, all of the EF Core database providers were broken. Since then various development teams, both private and commercial, have been working on filling in the gaps.

For the purpose of this report, we're only going to look at production-ready EF Core database providers. Those still in preview/prerelease state will be addressed in a future article.

SQL Server

SQL Server is of course provided by Microsoft with the limitation that the EF Core provider only works with SQL Server 2008 and later.

For instances of SQL Server 2000 and 2005, you can use the original Entity Framework. However, those versions are no longer supported and should not continue to be used in production settings.

PostgreSQL

The de facto standard for accessing PostgreSQL from .NET is the Npgsql drivers along with EF and EF Core database providers. But they aren't the only ones.

Devart offers a commercial library for PostgreSQL called dotConnect. They advertise their product as,

dotConnect for PostgreSQL offers both high performance connectivity to the PostgreSQL database and a number of innovative development tools and technologies. It support a wide range of PostgreSQL-specific features, such as secure SSL connections, PostgreSQL notifications, PostgreSQL bulk data loading, GEOMETRY, PostgreSQL ARRAY types, and others.

In addition to an ADO.NET driver, "dotConnect for PostgreSQL supports ADO.NET Entity Framework, NHibernate, and LinqConnect (formerly known as LINQ to PostgreSQL)". The last one is based on Microsoft's LINQ to SQL ORM.

SQLite

Microsoft's SQLite provider is based on SQLitePCL, an implementation of SQLite designed for the "Portable Class Library" framework. PCL was a precursor to and subset of the .NET Standard. It should be noted this is separate from the official .NET Standard drivers for SQLite. These official drivers were not available when Microsoft implemented the SQLite database provider.

If you don't find the Microsoft provider to be sufficient, there is also a SQLite driver and EF provider by Devart.

MySql

Several teams are offering MySQL data providers. First up is the official MySQL provider offered by Oracle.

The problem with it is the underlying MySQL database driver doesn't have a good reputation. Though open source, it is licensed under GPLv2, a rather restrictive license not normally seen in the .NET community. But the real problem is that Oracle's MySQL driver doesn't support asynchronous calls. Rather, according to the MySqlConnector team, it just spins up additional threads to perform synchronous I/O.

For this reason, MySqlConnector was created from scratch. It claims to be fully asynchronous and is offered under the MIT license. Built on top MySqlConnector is the Pomelo Foundation's MySQL database provider for EF Core.

And again, Devart offers a commercial MySQL database driver and EF Core provider. Their distinguishing feature set includes "MySQL-specific features, such as secure SSL and SSH connections, embedded server, compression protocol, HTTP tunneling and others."

Firebird

The Firebird database doesn't get a lot of attention in the .NET community, but its been around for a long time. It was originally based on Borland's open source edition of InterBase, but most of that code has been rewritten over the last 19 years.

In addition to the official Firebird database provider, Rafael Almeida offers EntityFrameworkCore.FirebirdSql, which is also compatible with Firebird 2.x databases.

Progress OpenEdge

Microsoft is keeping the EF Core provider list up to date. The most recent offering, Alex Wiese's EF Core provider for Progress OpenEdge, has only been available for about a month.

Microsoft Access

Support for MS Access is handled by a single individual from Italy know as bubibubi. His library, known as EntityFrameworkCore.Jet, is only available for the .NET Framework.

The reason for this limitation is OleDB is not currently offered for .NET Core, even when running on Windows. This may change in the future, as many WinForms and WPF applications cannot be ported to .NET Core without OleDB. In addition to Access, many of these applications use OleDB drivers to read from Excel files.

SQL Server Compact

While SQL Server Compact has been deprecated in favor of SQLite since 2013, many applications may still have data contained in it. In case you find yourself in that position, Erik Ejlskov Jensen offers EF Core database providers for SQL Server Compact.

Due to the design of SQL Server Compact and its underlying drivers, this only works with the .NET Framework.

DB2

IBM's powerful but rarely talked about database, DB2, requires separate libraries for Windows, Linux, and OSX. All three are offered directly by IBM.

Oracle

Oracle originally intended to certify ODP.NET, Managed Driver on Microsoft .NET Core around the end of calendar year 2017. This plan, announced in March 2017, would only be for .NET Core 2.0. In February of 2018 the plan was amended to have an expected release in 3rd quarter of 2018. Since missing this second deadline, Oracle has not publicly discussed their revised plans.

Devart offers an Oracle database driver and EF Core provider under a commercial license.

Rate this Article

Adoption
Style

BT