EntityFrameworkCore.Jet is an Entity Framework Core provider for Microsoft Jet/ACE databases (supporting the Microsoft Access database file formats MDB and ACCDB).
| EntityFrameworkCore.Jet Version | Entity Framework Core Version | .NET | Notes |
|---|---|---|---|
| 10.0.x | 10.0.x | 10.0+ | Current development line |
| 9.0.x | 9.0.x | 9.0+ | Supported |
| 8.0.x | 8.0.x | 8.0+ | Alpha 2 onwards is compatible with EF Core RTM |
| 7.0.x | 7.0.x | 6.0+ | |
| 6.0.x | 6.0.x | 6.0+ |
The major version corresponds to the major version of EF Core (i.e. EFCore.Jet 3.x is compatible with EF Core 3.y).
It runs on Windows operating systems only and can be used with either ODBC or OLE DB together with their respective Access Database driver/provider.
EntityFrameworkCore.Jet requires:
- Windows.
- A Microsoft Access Database Engine driver/provider for either ODBC or OLE DB.
- A process architecture (
x86orx64) that matches the installed Access driver/provider.
The provider works with Microsoft Access MDB and ACCDB database files.
- EntityFrameworkCore.Jet - the EF Core provider.
- EntityFrameworkCore.Jet.Data - the shared ADO.NET-style data access layer used by the provider packages.
- EntityFrameworkCore.Jet.Odbc - ODBC support, including the
UseJetOdbcextension method. - EntityFrameworkCore.Jet.OleDb - OLE DB support, including the
UseJetOleDbextension method.
Install the provider package for the data access technology you want to use:
dotnet add package EntityFrameworkCore.Jet.OleDbor:
dotnet add package EntityFrameworkCore.Jet.OdbcConfigure your DbContext with the matching UseJet... extension method:
using Microsoft.EntityFrameworkCore;
public class BloggingContext : DbContext
{
public DbSet<Blog> Blogs => Set<Blog>();
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseJetOleDb(
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Data\Blogging.accdb");
}
public class Blog
{
public int Id { get; set; }
public string? Url { get; set; }
}For ODBC, use UseJetOdbc instead:
optionsBuilder.UseJetOdbc(
@"Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\Data\Blogging.accdb;");All official releases are available on nuget.org.
CI publishes each build to MyGet. To use the latest CI builds, add a NuGet.config file to your solution root, add the feeds you are interested in and enable prereleases:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="efcorejet-daily" value="https://www.myget.org/F/cirrusred/api/v3/index.json" />
<add key="efcorejet-daily-debug" value="https://www.myget.org/F/cirrusred-debug/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>There are two CI build feeds available, one with (optimized) Release configuration builds and one with (unoptimized) Debug configuration builds.
All packages use SourceLink.
In order to simplify writing code for more than just one provider, some Fluent API method names have been made specific to Jet. Examples are:
UseIdentityColumn->UseJetIdentityColumnUseIdentityColumns->UseJetIdentityColumns
More information can be found on our Wiki.
Questions, bug reports, and feature requests can be opened as GitHub issues.