H2Sharp.EntityFrameworkCore
9.0.12-alpha.13
dotnet add package H2Sharp.EntityFrameworkCore --version 9.0.12-alpha.13
NuGet\Install-Package H2Sharp.EntityFrameworkCore -Version 9.0.12-alpha.13
<PackageReference Include="H2Sharp.EntityFrameworkCore" Version="9.0.12-alpha.13" />
<PackageVersion Include="H2Sharp.EntityFrameworkCore" Version="9.0.12-alpha.13" />
<PackageReference Include="H2Sharp.EntityFrameworkCore" />
paket add H2Sharp.EntityFrameworkCore --version 9.0.12-alpha.13
#r "nuget: H2Sharp.EntityFrameworkCore, 9.0.12-alpha.13"
#:package H2Sharp.EntityFrameworkCore@9.0.12-alpha.13
#addin nuget:?package=H2Sharp.EntityFrameworkCore&version=9.0.12-alpha.13&prerelease
#tool nuget:?package=H2Sharp.EntityFrameworkCore&version=9.0.12-alpha.13&prerelease
H2Sharp.EntityFrameworkCore
An Entity Framework Core provider for H2Sharp — the C# port of H2 Database 2.5. It is a fork of EFCore.PG with PostgreSQL's surface replaced by H2's: the type mappings, migrations SQL, connection handling and DDL are H2's. The provider is built for .NET 8 and .NET 10.
await using var ctx = new BlogContext();
await ctx.Database.EnsureDeletedAsync();
await ctx.Database.EnsureCreatedAsync();
ctx.Blogs.Add(new() { Name = "FooBlog" });
await ctx.SaveChangesAsync();
var fBlogs = await ctx.Blogs.Where(b => b.Name.StartsWith("F")).ToListAsync();
public class BlogContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseH2("Data Source=mydatabase;Storage=Memory");
}
public class Blog
{
public int Id { get; set; }
public string Name { get; set; }
}
An H2 database belongs to a data source: the data source creates it, keeps it alive and hands
out the connections. The connection string names the database and Storage says whether it is
Memory or File. A JDBC URL is not a connection string here. To own the database yourself,
pass an H2DataSource instance to UseH2.
EF.Functions exposes the built-in functions of H2 that the engine can run: date and time,
string, binary, number and bit functions, plus the provider's H2-shaped helpers (ILike,
Reverse, StringToArray, ToDate/ToTimestamp, JSON containment/existence). Arrays, JSON,
window functions and INFORMATION_SCHEMA are mapped as H2 2.5 defines them. The optional
NetTopologySuite and NodaTime packages add geometry and NodaTime mappings.
On the released engine the functional suite is green: 22 917 passed / 0 failed / 172 skipped on .NET 9 and .NET 10. Suites that need capabilities H2 2.5 does not have (geography, ranges, PostgreSQL extensions, the PostGIS-shaped GearsOfWar model) remain outside compilation; exact reasons are in DIVERGENCES.md.
Documentation: usage guide, SQL dialect, repository.
Licensed under the PostgreSQL License, inherited from EFCore.PG.
| Product | Versions 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. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- H2Sharp (>= 0.1.44-alpha.2)
- Microsoft.EntityFrameworkCore (>= 9.0.14 && < 10.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.14 && < 10.0.0)
-
net8.0
- H2Sharp (>= 0.1.44-alpha.2)
- Microsoft.EntityFrameworkCore (>= 9.0.14 && < 10.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.14 && < 10.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on H2Sharp.EntityFrameworkCore:
| Package | Downloads |
|---|---|
|
H2Sharp.EntityFrameworkCore.BinaryFunctions
Binary functions for the H2Sharp Entity Framework Core provider. The provider-agnostic core is the upstream Zomp package; this package is the H2 adapter for it. |
|
|
H2Sharp.EntityFrameworkCore.NetTopologySuite
NetTopologySuite geometry mapping plugin for the H2Sharp Entity Framework Core provider. |
|
|
H2Sharp.EntityFrameworkCore.NodaTime
NodaTime support plugin for the H2 Entity Framework Core provider. |
|
|
H2Sharp.EntityFrameworkCore.WindowFunctions
Window functions for the H2Sharp Entity Framework Core provider. The provider-agnostic core is the upstream Zomp package; this package is the H2 adapter for it. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.12-alpha.13 | 37 | 12/3/2026 |