![]() |
VOOZH | about |
dotnet add package ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly --version 7.0.10
NuGet\Install-Package ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly -Version 7.0.10
<PackageReference Include="ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly" Version="7.0.10" />
<PackageVersion Include="ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly" Version="7.0.10" />Directory.Packages.props
<PackageReference Include="ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly" />Project file
paket add ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly --version 7.0.10
#r "nuget: ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly, 7.0.10"
#:package ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly@7.0.10
#addin nuget:?package=ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly&version=7.0.10Install as a Cake Addin
#tool nuget:?package=ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly&version=7.0.10Install as a Cake Tool
👁 build status
👁 latest version
👁 downloads
👁 license
Adds .NET 6 or later DateOnly and TimeOnly support to the SQL Server EF Core provider. These types map directly to the SQL Server date and time data types.
The latest version is available on NuGet.
dotnet add package ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly
The following table show which version of this library to use with which version of EF Core.
| EF Core | Version to use |
|---|---|
| 6.0 | 6.0.x |
| 7.0 | 7.0.x |
| 8.0+ | Built-in |
Enable DateOnly and TimeOnly support by calling UseDateOnlyTimeOnly inside UseSqlServer. UseSqlServer is is typically called inside Startup.ConfigureServices or OnConfiguring of your DbContext type.
options.UseSqlServer(
connectionString,
x => x.UseDateOnlyTimeOnly());
Add DateOnly and TimeOnly properties to your entity types. Or reverse engineer a table with date and time columns.
class EventSchedule
{
public int Id { get; set; }
public DateOnly StartDate { get; set; }
public TimeOnly TimeOfDay { get; set; }
}
Insert data.
dbContext.Add(new EventSchedule { StartDate = new DateOnly(2022, 12, 24), TimeOfDay = new TimeOnly(12, 00) });
dbContext.SaveChanges();
Query.
var eventsOfTheDay = from e in dbContext.EventSchedules
where e.StartDate == new DateOnly(2022, 10, 12)
select e;
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly:
| Package | Downloads |
|---|---|
|
LykkeBiz.Common.MsSql
Microsoft SQL server EF Core DBContext with Lykke specific |
Showing the top 1 popular GitHub repositories that depend on ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly:
| Repository | Stars |
|---|---|
|
zzzprojects/EntityFramework-Plus
Entity Framework Plus extends your DbContext with must-haves features: Include Filter, Auditing, Caching, Query Future, Batch Delete, Batch Update, and more
|
| Version | Downloads | Last Updated |
|---|---|---|
| 7.0.10 | 227,838 | 6/3/2024 |
| 7.0.9 | 41,311 | 5/8/2024 |
| 7.0.8 | 75,273 | 1/31/2024 |
| 7.0.7 | 9,648 | 1/11/2024 |
| 7.0.6 | 35,169 | 12/12/2023 |
| 7.0.5 | 202,510 | 6/9/2023 |
| 7.0.4 | 16,502 | 5/11/2023 |
| 7.0.4-preview1 | 317 | 5/9/2023 |
| 7.0.3 | 14,338 | 4/19/2023 |
| 6.0.11 | 7,859 | 10/6/2024 |
| 6.0.10 | 16,876 | 6/3/2024 |
| 6.0.9 | 2,547 | 5/8/2024 |
| 6.0.8 | 46,714 | 1/31/2024 |
| 6.0.7 | 1,233 | 1/11/2024 |
| 6.0.6 | 8,082 | 12/12/2023 |
| 6.0.5 | 25,932 | 6/9/2023 |
| 6.0.4 | 3,389 | 5/11/2023 |
| 6.0.4-preview1 | 316 | 5/9/2023 |
| 6.0.3 | 9,018 | 4/19/2023 |
| 6.0.2 | 2,208 | 4/4/2023 |
Update to M.D.S. 5.2.1