Qrtix.EFCore.Converters
1.0.0
dotnet add package Qrtix.EFCore.Converters --version 1.0.0
NuGet\Install-Package Qrtix.EFCore.Converters -Version 1.0.0
<PackageReference Include="Qrtix.EFCore.Converters" Version="1.0.0" />
paket add Qrtix.EFCore.Converters --version 1.0.0
#r "nuget: Qrtix.EFCore.Converters, 1.0.0"
// Install Qrtix.EFCore.Converters as a Cake Addin #addin nuget:?package=Qrtix.EFCore.Converters&version=1.0.0 // Install Qrtix.EFCore.Converters as a Cake Tool #tool nuget:?package=Qrtix.EFCore.Converters&version=1.0.0
Entity Framework Core Converters
This library offers a range of custom converters that can be integrated into Entity Framework Core through the overriding of the ConfigureConventions method. These converters enable flexible and personalized data transformation between database data types and application data types.
Consult the online documentation for more details.
Table of Contents
Installation
NuGet Package Manager
- Open your project in Visual Studio.
- Right-click on your project in Solution Explorer.
- Select "Manage NuGet Packages..."
- Search for "Qrtix.EFCore.Converters" in the NuGet Package Manager.
- Click on "Install" to add the package to your project.
.NET CLI
You can also install Qrtix.EFCore.Converters using the .NET CLI:
dotnet add package Qrtix.EFCore.Converters
Converters
Converters | Description |
---|---|
TimeOnlyConverter |
Performs bidirectional conversion between the TimeOnly and TimeSpan types to enable Entity Framework Core compatibility with the TimeOnly struct. |
DateOnlyConverter |
Performs bidirectional conversion between the DateOnly and DateTime types to enable Entity Framework Core compatibility with the DateOnly struct. |
Integrating the converters
protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
{
configurationBuilder.Properties<TimeOnly>().HaveConversion<TimeOnlyConverter>().HaveColumnType("time");
configurationBuilder.Properties<DateOnly>().HaveConversion<DateOnlyConverter>().HaveColumnType("date");
// add converters as you need
base.ConfigureConventions(configurationBuilder);
}
Contributing
Did you find a bug?
- Ensure the bug was not already reported by searching on GitHub under Issues.
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
Did you write a patch that fixes a bug?
- Open a new GitHub pull request with the patch.
- Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
Do you intend to add a new feature or change an existing one?
- First suggest your change in the EFCore ideas page for discussion.
- There are no fixed rules on what should and shouldn't be in this library, but some features are more valuable than others, and some require long-term maintenance that outweighs the value of the feature. So please get sign-off from the project leader (Carlos J. Ortiz) before putting in an excessive amount of work.
Do you have questions about the source code?
- Ask any question about how to use EFCore in the EFCore discussion page.
Product | Versions 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 is compatible. 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. |
-
net6.0
- Microsoft.EntityFrameworkCore (>= 7.0.17)
-
net7.0
- Microsoft.EntityFrameworkCore (>= 7.0.17)
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.3)
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 |
---|---|---|
1.0.0 | 128 | 4/21/2024 |
First Realese