H2Sharp.EntityFrameworkCore.NodaTime
9.0.12-alpha.14
dotnet add package H2Sharp.EntityFrameworkCore.NodaTime --version 9.0.12-alpha.14
NuGet\Install-Package H2Sharp.EntityFrameworkCore.NodaTime -Version 9.0.12-alpha.14
<PackageReference Include="H2Sharp.EntityFrameworkCore.NodaTime" Version="9.0.12-alpha.14" />
<PackageVersion Include="H2Sharp.EntityFrameworkCore.NodaTime" Version="9.0.12-alpha.14" />
<PackageReference Include="H2Sharp.EntityFrameworkCore.NodaTime" />
paket add H2Sharp.EntityFrameworkCore.NodaTime --version 9.0.12-alpha.14
#r "nuget: H2Sharp.EntityFrameworkCore.NodaTime, 9.0.12-alpha.14"
#:package H2Sharp.EntityFrameworkCore.NodaTime@9.0.12-alpha.14
#addin nuget:?package=H2Sharp.EntityFrameworkCore.NodaTime&version=9.0.12-alpha.14&prerelease
#tool nuget:?package=H2Sharp.EntityFrameworkCore.NodaTime&version=9.0.12-alpha.14&prerelease
H2Sharp.EntityFrameworkCore.NodaTime
A plugin for the H2Sharp Entity Framework Core provider that maps
NodaTime types to H2 date and time columns. It gives applications a safer
API for instants, local dates and time zones than the BCL DateTime types.
using NodaTime;
await using var ctx = new BlogContext();
await ctx.Database.EnsureDeletedAsync();
await ctx.Database.EnsureCreatedAsync();
ctx.Blogs.Add(new()
{
Name = "FooBlog",
CreationTime = SystemClock.Instance.GetCurrentInstant()
});
await ctx.SaveChangesAsync();
var newBlogs = await ctx.Blogs
.Where(b => b.CreationTime >= Instant.FromUtc(2020, 1, 1, 0, 0, 0))
.ToListAsync();
public class BlogContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseH2("Data Source=mydatabase;Storage=Memory", o => o.UseNodaTime());
}
public class Blog
{
public int Id { get; set; }
public string Name { get; set; }
public Instant CreationTime { get; set; }
}
NodaTime members translate into H2's date and time operations. The connection string is the
classic ADO.NET form used by the engine (Data Source, Storage), not a JDBC URL or a
PostgreSQL connection string.
See the usage guide and DIVERGENCES.md for what the engine can and cannot run today.
The documentation site covers the SQL reference, the .NET API and the status. Related packages: H2Sharp — the engine; H2Sharp.EntityFrameworkCore — the provider this plugin extends; H2Sharp.EntityFrameworkCore.WindowFunctions and H2Sharp.EntityFrameworkCore.BinaryFunctions — window and binary functions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
net8.0
- H2Sharp.EntityFrameworkCore (>= 9.0.12-alpha.14)
- NodaTime (>= 3.2.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.12-alpha.14 | 44 | 12/4/2026 |
| 9.0.12-alpha.13 | 50 | 12/3/2026 |