EntityFrameworkCore.SqlServer.NodaTime
NodaTime extension for the Microsoft SQL Server database provider for Entity Framework Core
Install / Use
/learn @jpd30/EntityFrameworkCore.SqlServer.NodaTimeREADME
Repository
This repository is home to the following project. This project is maintained by Jon Davies and licensed under the Apache Licence, Version 2.0.
- [EntityFrameworkCore.SqlServer.NodaTime]
EntityFrameworkCore.SqlServer.NodaTime
Installation
EF Core SqlServer NodaTime will be available on NuGet. Install the project, along with the SQL Server database provider and underlying EF Core packages.
dotnet add package EntityFrameworkCore.SqlServer.NodaTime
Use the --version option to specify a preview version to install.
Usage
The following code demonstrates a simple entity and DbContext making use of EF Core SQL Server NodaTime.
class MyEntity
{
public int Id { get; set; }
public Instant Instant { get; set; }
public LocalDate LocalDate { get; set; }
public LocalTime LocalTime { get; set; }
public LocalDateTime LocalDateTime { get; set; }
public OffsetDateTime OffsetDateTime { get; set; }
}
class MyContext : DbContext
{
public DbSet<MyEntity> MyEntities { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(
@"Server=(LocalDB)\MSSQLLocalDB;Initial Catalog=SqlServerNodaTime",
options => options.UseNodaTime()
);
}
}
Related Skills
feishu-drive
349.9k|
things-mac
349.9kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
349.9kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
postkit
PostgreSQL-native identity, configuration, metering, and job queues. SQL functions that work with any language or driver
