TinyHelpers.EntityFrameworkCore 1.0.57

There is a newer version of this package available.
See the version list below for details.
dotnet add package TinyHelpers.EntityFrameworkCore --version 1.0.57
NuGet\Install-Package TinyHelpers.EntityFrameworkCore -Version 1.0.57
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TinyHelpers.EntityFrameworkCore" Version="1.0.57" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TinyHelpers.EntityFrameworkCore --version 1.0.57
#r "nuget: TinyHelpers.EntityFrameworkCore, 1.0.57"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TinyHelpers.EntityFrameworkCore as a Cake Addin
#addin nuget:?package=TinyHelpers.EntityFrameworkCore&version=1.0.57

// Install TinyHelpers.EntityFrameworkCore as a Cake Tool
#tool nuget:?package=TinyHelpers.EntityFrameworkCore&version=1.0.57

Tiny Helpers for Entity Framework Core

GitHub Super-Linter NuGet Nuget

A collection of helper methods and classes for Entity Framework Core that I use everyday. I have packed them in a single library to avoid code duplication.

Installation

The library is available on NuGet. Just search TinyHelpers.EntityFrameworkCore in the Package Manager GUI or run the following command in the Package Manager Console:

Install-Package TinyHelpers.EntityFrameworkCore

Usage

The library provides some Value Converters to handle data types that are not natively supported by Entity Framework Core. They can be explicitly used calling the HasConversion method, or automatically via some extension methods:

// using TinyHelpers.EntityFrameworkCore.Extensions;
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder.Entity<Post>(builder =>
    {           
        // Date is a DateOnly property (.NET 6)
        builder.Property(x => x.Date).HasDateOnlyConversion();
    
        // Time is a TimeOnly property (.NET 6)
        builder.Property(x => x.Time).HasTimeOnlyConversion();
   
        // Comments is a complex type, this Converter will automatically JSON-de/serialize it
        // in a string column.
        builder.Property(x => x.Comments).HasJsonConversion();
    });
}

Contribute

The project is constantly evolving. Contributions are welcome. Feel free to file issues and pull requests on the repo and we'll address them as we can.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
3.0.14 1,087 3/26/2024
3.0.12 306 2/27/2024
3.0.8 958 2/14/2024
3.0.6 209 2/12/2024
3.0.3 2,906 1/11/2024
3.0.2 3,986 11/21/2023
2.0.21 12,149 9/4/2023
2.0.20 3,857 6/29/2023
2.0.19 856 6/14/2023
2.0.18 3,735 4/12/2023
2.0.17 556 4/10/2023
2.0.16 1,849 3/27/2023
2.0.14 9,909 3/15/2023
2.0.13 1,213 3/1/2023
2.0.12 1,433 2/21/2023
2.0.10 4,017 1/11/2023
2.0.9 605 1/9/2023
2.0.4 919 11/30/2022
1.0.76 1,956 10/31/2022
1.0.72 5,521 9/21/2022
1.0.61 8,854 7/25/2022
1.0.59 1,030 6/30/2022
1.0.57 769 6/21/2022
1.0.56 1,540 6/2/2022
1.0.52 9,169 3/28/2022
1.0.48 1,505 2/7/2022
1.0.45 3,501 1/25/2022
1.0.43 747 1/20/2022
1.0.34 946 1/7/2022