├── docs ├── docs │ ├── introduction.md │ ├── toc.yml │ ├── contributing.md │ ├── converters-introduction.md │ ├── converters-getting-started.md │ ├── repository-pattern-getting-started.md │ └── repository-pattern-introduction.md ├── toc.yml ├── docfx.json └── index.md ├── tests └── EFCore.Converters.Tests.UnitTests │ ├── GlobalUsings.cs │ ├── EFCore.Converters.Tests.UnitTests.csproj │ └── DateTime │ ├── TimeOnlyConverterTests.cs │ └── DateOnlyConverterTests.cs ├── .gitignore ├── src └── EFCore.Converters │ ├── DateTime │ ├── TimeOnlyConverter.cs │ └── DateOnlyConverter.cs │ ├── EFCore.Converters.csproj │ └── README.md ├── LICENSE ├── .github └── workflows │ ├── converters-ci.yml │ ├── github-page-deploy.yml │ └── converters-cd.yml ├── EFCore.sln ├── EFCore.sln.DotSettings.user └── README.md /docs/docs/introduction.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Docs 2 | href: docs/ 3 | - name: API 4 | href: api/ -------------------------------------------------------------------------------- /tests/EFCore.Converters.Tests.UnitTests/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | global using Xunit; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vs/ 3 | .vscode/ 4 | .code/ 5 | _site/ 6 | bin/ 7 | obj/ 8 | /packages/ 9 | riderModule.iml 10 | /_ReSharper.Caches/ 11 | docs/api/ 12 | -------------------------------------------------------------------------------- /docs/docs/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Introduction 2 | href: introduction.md 3 | - name: EFCore.Converters 4 | href: converters-introduction.md 5 | items: 6 | - name: Getting Started 7 | href: converters-getting-started.md 8 | - name: EFCore.RepositoryPattern 9 | href: repository-pattern-introduction.md 10 | items: 11 | - name: Getting Started 12 | href: repository-pattern-getting-started.md 13 | - name: Contributing 14 | href: contributing.md -------------------------------------------------------------------------------- /src/EFCore.Converters/DateTime/TimeOnlyConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 2 | 3 | namespace EFCore.Converters.DateTime; 4 | 5 | /// 6 | /// Performs bidirectional conversion between the `TimeOnly` and `TimeSpan` types to enable Entity Framework Core 7 | /// compatibility with the `TimeOnly` struct. 8 | /// 9 | public class TimeOnlyConverter : ValueConverter 10 | { 11 | /// 12 | /// Initializes a new instance of the class. 13 | /// 14 | public TimeOnlyConverter() 15 | : base(timeOnly => timeOnly.ToTimeSpan(), 16 | timeSpan => TimeOnly.FromTimeSpan(timeSpan)) 17 | { 18 | } 19 | } -------------------------------------------------------------------------------- /src/EFCore.Converters/DateTime/DateOnlyConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 2 | 3 | namespace EFCore.Converters.DateTime; 4 | 5 | /// 6 | /// Performs bidirectional conversion between the `DateOnly` and `DateTime` types to enable Entity Framework Core 7 | /// compatibility with the `DateOnly` struct. 8 | /// 9 | public class DateOnlyConverter : ValueConverter 10 | { 11 | /// 12 | /// Initializes a new instance of the class. 13 | /// 14 | public DateOnlyConverter() 15 | : base(dateOnly => dateOnly.ToDateTime(default), 16 | dateOnly => DateOnly.FromDateTime(dateOnly)) 17 | { 18 | } 19 | } -------------------------------------------------------------------------------- /docs/docfx.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": [ 3 | { 4 | "src": [ 5 | { 6 | "src": "../src", 7 | "files": [ 8 | "**/*.csproj" 9 | ] 10 | } 11 | ], 12 | "dest": "api", 13 | "allowCompilationErrors": true, 14 | "outputFormat": "markdown" 15 | } 16 | ], 17 | "build": { 18 | "content": [ 19 | { 20 | "files": [ 21 | "**/*.{md,yml}" 22 | ], 23 | "exclude": [ 24 | "_site/**" 25 | ] 26 | } 27 | ], 28 | "resource": [ 29 | { 30 | "files": [ 31 | "images/**" 32 | ] 33 | } 34 | ], 35 | "output": "_site", 36 | "template": [ 37 | "default", 38 | "modern" 39 | ], 40 | "globalMetadata": { 41 | "_appName": "EFCore", 42 | "_appTitle": "EFCore", 43 | "_enableSearch": true, 44 | "_appFooter": "Copyright © 2024 Carlos J. Ortiz || carlosjortiz", 45 | "_disableContribution": true, 46 | "_lang": "EN", 47 | "pdf": false 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Carlos J. Ortiz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tests/EFCore.Converters.Tests.UnitTests/EFCore.Converters.Tests.UnitTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | false 9 | true 10 | 11 | 12 | 13 | 14 | 15 | 16 | runtime; build; native; contentfiles; analyzers; buildtransitive 17 | all 18 | 19 | 20 | runtime; build; native; contentfiles; analyzers; buildtransitive 21 | all 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /.github/workflows/converters-ci.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a .NET project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net 3 | 4 | name: Converters CI 5 | 6 | on: 7 | push: 8 | branches: [ "develop" ] 9 | pull_request: 10 | branches: [ "develop" ] 11 | 12 | env: 13 | PATH_PROJECT: src\EFCore.Converters 14 | PROJECT_NAME: EFCore.Converters.csproj 15 | PATH_TEST: tests\EFCore.Converters.Tests.UnitTests 16 | 17 | jobs: 18 | build: 19 | name: Build & Test project 20 | runs-on: windows-latest 21 | steps: 22 | - uses: actions/checkout@v3 23 | - name: Setting up .NET 24 | uses: actions/setup-dotnet@v3 25 | with: 26 | dotnet-version: | 27 | 8.x 28 | 7.x 29 | 6.x 30 | # cache: true 31 | - name: Restoring dependencies 32 | run: dotnet restore 33 | working-directory: ${{ env.PATH_PROJECT }} 34 | - name: Building the project 35 | run: dotnet build --no-restore --configuration Debug 36 | working-directory: ${{ env.PATH_PROJECT }} 37 | - name: Running the Unit Tests 38 | run: dotnet test --verbosity normal 39 | working-directory: ${{ env.PATH_TEST }} -------------------------------------------------------------------------------- /.github/workflows/github-page-deploy.yml: -------------------------------------------------------------------------------- 1 | # Your GitHub workflow file under .github/workflows/ 2 | 3 | name: Github Page deploy 4 | 5 | # Trigger the action on push to master 6 | on: 7 | push: 8 | branches: ["master"] 9 | 10 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 11 | permissions: 12 | actions: read 13 | pages: write 14 | id-token: write 15 | 16 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 17 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 18 | concurrency: 19 | group: "pages" 20 | cancel-in-progress: false 21 | 22 | jobs: 23 | publish-docs: 24 | name: Publish docs 25 | environment: 26 | name: github-pages 27 | url: ${{ steps.deployment.outputs.page_url }} 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Checkout 31 | uses: actions/checkout@v3 32 | - name: Dotnet Setup 33 | uses: actions/setup-dotnet@v3 34 | with: 35 | dotnet-version: 8.x 36 | 37 | - run: dotnet tool update -g docfx 38 | - run: docfx docs/docfx.json 39 | 40 | - name: Upload artifact 41 | uses: actions/upload-pages-artifact@v3 42 | with: 43 | # Upload entire repository 44 | path: 'docs/_site' 45 | - name: Deploy to GitHub Pages 46 | id: deployment 47 | uses: actions/deploy-pages@v4 48 | -------------------------------------------------------------------------------- /docs/docs/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | **Did you find a bug?** 4 | 5 | - Ensure the bug was not already reported by searching on GitHub 6 | under [Issues](https://github.com/carlosjortiz/EFCore/issues). 7 | - If you're unable to find an open issue addressing the 8 | problem, [open a new one](https://github.com/carlosjortiz/EFCore/issues/new). Be sure to include a title and clear 9 | description, as much relevant information as possible, and a code sample or an executable test case demonstrating the 10 | expected behavior that is not occurring. 11 | 12 | **Did you write a patch that fixes a bug?** 13 | 14 | - Open a new GitHub pull request with the patch. 15 | - Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. 16 | 17 | **Do you intend to add a new feature or change an existing one?** 18 | 19 | - First suggest your change in the [EFCore ideas page](https://github.com/carlosjortiz/EFCore/discussions/categories/ideas) 20 | for discussion. 21 | - There are no fixed rules on what should and shouldn't be in this library, but some features are more valuable than 22 | others, and some require long-term maintenance that outweighs the value of the feature. So please get sign-off from 23 | the 24 | project leader (Carlos J. Ortiz) before putting in an excessive amount of work. 25 | 26 | **Do you have questions about the source code?** 27 | 28 | - Ask any question about how to use EFCore in 29 | the [EFCore discussion page](https://github.com/carlosjortiz/EFCore/discussions/new?category=q-a). 30 | -------------------------------------------------------------------------------- /docs/docs/converters-introduction.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Welcome to the documentation for **EFCore.Converters**, a library designed to facilitate the conversion between .NET's `DateOnly` and `TimeOnly` structs and their corresponding types in Entity Framework Core (EF Core), namely `DateTime` and `TimeSpan`. 4 | 5 | ## Purpose 6 | 7 | EF Core natively supports a limited set of data types for use in database operations. While `DateTime` and `TimeSpan` are commonly used, .NET introduced new structs `DateOnly` and `TimeOnly` in version 6.0 to represent date and time values without the associated time zone and date components, respectively. 8 | 9 | **EFCore.Converters** bridges this gap by providing converters that enable seamless integration of `DateOnly` and `TimeOnly` with EF Core, allowing developers to store and retrieve these types from the database effortlessly. 10 | 11 | ## Key Features 12 | 13 | - Bidirectional conversion between `DateOnly` and `DateTime`. 14 | - Bidirectional conversion between `TimeOnly` and `TimeSpan`. 15 | - Simplifies storage and retrieval of `DateOnly` and `TimeOnly` in EF Core. 16 | 17 | ## Compatibility 18 | 19 | - Compatible with Entity Framework Core. 20 | - Supports .NET 6.0 and above. 21 | 22 | ## Installation 23 | 24 | ##### NuGet Package Manager 25 | 26 | 1. Open your project in Visual Studio. 27 | 2. Right-click on your project in Solution Explorer. 28 | 3. Select "Manage NuGet Packages..." 29 | 4. Search for "Qrtix.EFCore.Converters" in the NuGet Package Manager. 30 | 5. Click on "Install" to add the package to your project. 31 | 32 | ##### .NET CLI 33 | 34 | You can also install **Qrtix.EFCore.Converters** using the .NET CLI: 35 | 36 | ```sh 37 | dotnet add package Qrtix.EFCore.Converters 38 | ``` 39 | 40 | -------------------------------------------------------------------------------- /docs/docs/converters-getting-started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | To get started with **EFCore.Converters**, follow these simple steps: 4 | 5 | ## 1. Install the Package 6 | 7 | You can install the library via NuGet Package Manager Console: 8 | 9 | ```sh 10 | Install-Package Qrtix.EFCore.Converters 11 | ``` 12 | 13 | Or use the .NET CLI: 14 | 15 | ```sh 16 | dotnet add package Qrtix.EFCore.Converters 17 | ``` 18 | 19 | ## 2. Configure Converters 20 | 21 | After installing the package, configure the converters in your EF Core DbContext. For example: 22 | 23 | ```csharp 24 | using Microsoft.EntityFrameworkCore; 25 | using EFCore.Converters.DateTime; 26 | 27 | public class YourDbContext : DbContext 28 | { 29 | protected override void OnModelCreating(ModelBuilder modelBuilder) 30 | { 31 | modelBuilder 32 | .Entity() 33 | .Property(e => e.DateProperty) 34 | .HasConversion(new DateOnlyConverter()); 35 | 36 | modelBuilder 37 | .Entity() 38 | .Property(e => e.TimeProperty) 39 | .HasConversion(new TimeOnlyConverter()); 40 | } 41 | } 42 | ``` 43 | 44 | >[!IMPORTANT] 45 | > Replace `YourEntity`, `DateProperty`, and `TimeProperty` with your actual entity and properties. 46 | 47 | ## 3. Start Using Converters 48 | 49 | Once configured, you can use DateOnly and TimeOnly types in your entities, and EF Core will handle the conversion to 50 | DateTime and TimeSpan types automatically. 51 | 52 | ```csharp 53 | public class YourEntity 54 | { 55 | public int Id { get; set; } 56 | public DateOnly DateProperty { get; set; } 57 | public TimeOnly TimeProperty { get; set; } 58 | } 59 | ``` 60 | 61 | That's it! You're now ready to use EFCore.Converters in your Entity Framework Core project. -------------------------------------------------------------------------------- /tests/EFCore.Converters.Tests.UnitTests/DateTime/TimeOnlyConverterTests.cs: -------------------------------------------------------------------------------- 1 | using EFCore.Converters.DateTime; 2 | 3 | namespace EFCore.Converters.Tests.UnitTests.DateTime; 4 | 5 | public class TimeOnlyConverterTests 6 | { 7 | [Fact] 8 | public void Convert_TimeOnlyToTimeSpan_Success() 9 | { 10 | // Arrange 11 | var converter = new TimeOnlyConverter(); 12 | var timeOnly = new TimeOnly(13, 45, 30); 13 | 14 | // Act 15 | var timeSpan = converter.ConvertToProvider(timeOnly); 16 | 17 | // Assert 18 | Assert.Equal(new TimeSpan(13, 45, 30), timeSpan); 19 | } 20 | 21 | [Fact] 22 | public void Convert_TimeSpanToTimeOnly_Success() 23 | { 24 | // Arrange 25 | var converter = new TimeOnlyConverter(); 26 | var timeSpan = new TimeSpan(13, 45, 30); 27 | 28 | // Act 29 | var timeOnly = converter.ConvertFromProvider(timeSpan); 30 | 31 | // Assert 32 | Assert.Equal(new TimeOnly(13, 45, 30), timeOnly); 33 | } 34 | 35 | [Fact] 36 | public void Convert_NullTimeOnlyToTimeSpan_ReturnsNull() 37 | { 38 | // Arrange 39 | var converter = new TimeOnlyConverter(); 40 | 41 | // Act 42 | var timeSpan = converter.ConvertToProvider(null); 43 | 44 | // Assert 45 | Assert.Null(timeSpan); 46 | } 47 | 48 | [Fact] 49 | public void Convert_NullTimeSpanToTimeOnly_ReturnsNull() 50 | { 51 | // Arrange 52 | var converter = new TimeOnlyConverter(); 53 | 54 | // Act 55 | var timeOnly = converter.ConvertFromProvider(null); 56 | 57 | // Assert 58 | Assert.Null(timeOnly); 59 | } 60 | 61 | [Fact] 62 | public void Convert_EdgeCaseTimeSpanToTimeOnly_Success() 63 | { 64 | // Arrange 65 | var converter = new TimeOnlyConverter(); 66 | var timeSpan = new TimeSpan(23, 59, 59); // Latest possible time 67 | 68 | // Act 69 | var timeOnly = converter.ConvertFromProvider(timeSpan); 70 | 71 | // Assert 72 | Assert.Equal(new TimeOnly(23, 59, 59), timeOnly); 73 | } 74 | } -------------------------------------------------------------------------------- /tests/EFCore.Converters.Tests.UnitTests/DateTime/DateOnlyConverterTests.cs: -------------------------------------------------------------------------------- 1 | using EFCore.Converters.DateTime; 2 | 3 | namespace EFCore.Converters.Tests.UnitTests.DateTime; 4 | 5 | public class DateOnlyConverterTests 6 | { 7 | [Fact] 8 | public void Convert_DateOnlyToDateTime_Success() 9 | { 10 | // Arrange 11 | var converter = new DateOnlyConverter(); 12 | var dateOnly = new DateOnly(2024, 3, 31); 13 | 14 | // Act 15 | var dateTime = converter.ConvertToProvider(dateOnly); 16 | 17 | // Assert 18 | Assert.Equal(new System.DateTime(2024, 3, 31), dateTime); 19 | } 20 | 21 | [Fact] 22 | public void Convert_DateTimeToDateOnly_Success() 23 | { 24 | // Arrange 25 | var converter = new DateOnlyConverter(); 26 | var dateTime = new System.DateTime(2024, 3, 31); 27 | 28 | // Act 29 | var dateOnly = converter.ConvertFromProvider(dateTime); 30 | 31 | // Assert 32 | Assert.Equal(new DateOnly(2024, 3, 31), dateOnly); 33 | } 34 | 35 | [Fact] 36 | public void Convert_NullDateOnlyToDateTime_ReturnsNull() 37 | { 38 | // Arrange 39 | var converter = new DateOnlyConverter(); 40 | 41 | // Act 42 | var dateTime = converter.ConvertToProvider(null); 43 | 44 | // Assert 45 | Assert.Null(dateTime); 46 | } 47 | 48 | [Fact] 49 | public void Convert_NullDateTimeToDateOnly_ReturnsNull() 50 | { 51 | // Arrange 52 | var converter = new DateOnlyConverter(); 53 | 54 | // Act 55 | var dateOnly = converter.ConvertFromProvider(null); 56 | 57 | // Assert 58 | Assert.Null(dateOnly); 59 | } 60 | 61 | [Fact] 62 | public void Convert_EdgeCaseDateTimeToDateOnly_Success() 63 | { 64 | // Arrange 65 | var converter = new DateOnlyConverter(); 66 | var dateTime = new System.DateTime(1, 1, 1); // Earliest possible date 67 | 68 | // Act 69 | var dateOnly = converter.ConvertFromProvider(dateTime); 70 | 71 | // Assert 72 | Assert.Equal(new DateOnly(1, 1, 1), dateOnly); 73 | } 74 | } -------------------------------------------------------------------------------- /EFCore.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7AD366C5-E8F7-4371-A815-706106626994}" 4 | EndProject 5 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A31D232F-247B-4C48-BA63-AC16F2AEEC95}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Converters", "src\EFCore.Converters\EFCore.Converters.csproj", "{85C91548-B9AB-42F7-85F9-AC28D1F6E0C4}" 8 | EndProject 9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Converters.Tests.UnitTests", "tests\EFCore.Converters.Tests.UnitTests\EFCore.Converters.Tests.UnitTests.csproj", "{518C8003-7A10-4728-B5D3-830D30A6875F}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Any CPU = Debug|Any CPU 14 | Release|Any CPU = Release|Any CPU 15 | EndGlobalSection 16 | GlobalSection(NestedProjects) = preSolution 17 | {85C91548-B9AB-42F7-85F9-AC28D1F6E0C4} = {A31D232F-247B-4C48-BA63-AC16F2AEEC95} 18 | {518C8003-7A10-4728-B5D3-830D30A6875F} = {7AD366C5-E8F7-4371-A815-706106626994} 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {85C91548-B9AB-42F7-85F9-AC28D1F6E0C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {85C91548-B9AB-42F7-85F9-AC28D1F6E0C4}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {85C91548-B9AB-42F7-85F9-AC28D1F6E0C4}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {85C91548-B9AB-42F7-85F9-AC28D1F6E0C4}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {518C8003-7A10-4728-B5D3-830D30A6875F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {518C8003-7A10-4728-B5D3-830D30A6875F}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {518C8003-7A10-4728-B5D3-830D30A6875F}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {518C8003-7A10-4728-B5D3-830D30A6875F}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /EFCore.sln.DotSettings.user: -------------------------------------------------------------------------------- 1 | 2 | <SessionState ContinuousTestingMode="0" IsActive="True" Name="Convert_DateOnlyToDateTime_Success" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> 3 | <TestAncestor> 4 | <TestId>xUnit::518C8003-7A10-4728-B5D3-830D30A6875F::net8.0::EFCore.Converters.Tests.UnitTests.DateTime.DateOnlyConverterTests</TestId> 5 | <TestId>xUnit::518C8003-7A10-4728-B5D3-830D30A6875F::net8.0::EFCore.Converters.Tests.UnitTests.DateTime.TimeOnlyConverterTests</TestId> 6 | <TestId>xUnit::994F2D7A-4CC1-4B29-BE95-704E8301188F::net8.0::EFCore.RepositoryPattern.Tests.UnitTests.Repositories.RepositoryQueryExtensionsTest.WithTrackingOptionTests</TestId> 7 | <TestId>xUnit::994F2D7A-4CC1-4B29-BE95-704E8301188F::net8.0::EFCore.RepositoryPattern.Tests.UnitTests.Repositories.RepositoryQueryExtensionsTest.WithIncludePropertiesTests.CanIncludePropertiesWhenIncludesIsNotNull</TestId> 8 | <TestId>xUnit::994F2D7A-4CC1-4B29-BE95-704E8301188F::net8.0::EFCore.RepositoryPattern.Tests.UnitTests.Repositories.RepositoryQueryExtensionsTest.WithIncludePropertiesTests</TestId> 9 | <TestId>xUnit::994F2D7A-4CC1-4B29-BE95-704E8301188F::net8.0::EFCore.RepositoryPattern.Tests.UnitTests.Repositories.RepositoryQueryExtensionsTest.ApplyOrderingTests</TestId> 10 | <TestId>xUnit::994F2D7A-4CC1-4B29-BE95-704E8301188F::net8.0::EFCore.RepositoryPattern.Tests.UnitTests.Repositories.RepositoryTest.GetManyAsyncTests.GetManyAsync_ShouldReturn_AllEntities</TestId> 11 | <TestId>xUnit::994F2D7A-4CC1-4B29-BE95-704E8301188F::net8.0::EFCore.RepositoryPattern.Tests.Repositories.RepositoryTest.GetManyAsyncTests</TestId> 12 | </TestAncestor> 13 | </SessionState> -------------------------------------------------------------------------------- /src/EFCore.Converters/EFCore.Converters.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0;net7.0;net6.0 5 | enable 6 | enable 7 | 8 | default 9 | true 10 | true 11 | Carlos J. Ortiz 12 | 13 | This library offers a range of custom converters that can be integrated into Entity Framework Core through 14 | the overriding of the ConfigureConventions method. These converters enable flexible and personalized data 15 | transformation between database data types and application data types. 16 | 17 | https://github.com/carlosjortiz/EFCore 18 | true 19 | EFCore.Converters 20 | 1.1.0 21 | README.md 22 | git 23 | Qrtix.EFCore.Converters 24 | First Realese 25 | MIT 26 | 27 | EFCore, Converters, EF, EFCore.Converters, EFCore.Converters, EntityFrameworkCore, EntityFramework.Converters, 28 | Converter 29 | 30 | Copyright (c) Carlos J. Ortiz. All rights reserved. 31 | https://github.com/users/carlosjortiz/projects/1 32 | 33 | 34 | 35 | bin\Release\EFCore.Converters.xml 36 | 37 | 38 | 39 | bin\Debug\EFCore.Converters.xml 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /.github/workflows/converters-cd.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a .NET project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net 3 | 4 | name: Converters CD 5 | 6 | on: 7 | push: 8 | branches: [ "master" ] 9 | 10 | env: 11 | PATH_PROJECT: src\EFCore.Converters 12 | PATH_RELEASE: src\EFCore.Converters\bin\Release 13 | PROJECT_NAME: EFCore.Converters.csproj 14 | 15 | jobs: 16 | publish: 17 | name: Publish Lib 18 | runs-on: windows-latest 19 | steps: 20 | - uses: actions/checkout@v3 21 | - name: Setting up .NET 22 | uses: actions/setup-dotnet@v3 23 | with: 24 | dotnet-version: | 25 | 8.x 26 | 7.x 27 | 6.x 28 | # cache: true 29 | - name: Restoring dependencies 30 | run: dotnet restore 31 | working-directory: ${{ env.PATH_PROJECT }} 32 | - name: Building the project 33 | run: dotnet build --no-restore --configuration Release 34 | working-directory: ${{ env.PATH_PROJECT }} 35 | - name: Creatnig NuGet Package 36 | run: dotnet pack ${{ env.PROJECT_NAME }} --no-build -c Release 37 | working-directory: ${{ env.PATH_PROJECT }} 38 | - name: Publishing into NuGet 39 | run: dotnet nuget push *.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json 40 | working-directory: ${{ env.PATH_RELEASE }} 41 | - name: Publishing into Github Packages 42 | env: 43 | GH_TOKEN: ${{ secrets.GH_TOKEN }} 44 | run: dotnet nuget push *.nupkg --skip-duplicate --api-key ${{ secrets.GH_TOKEN }} --source https://nuget.pkg.github.com/carlosjortiz/index.json 45 | working-directory: ${{ env.PATH_RELEASE }} 46 | # - name: Creating Release in Github 47 | # env: 48 | # GH_TOKEN: ${{ secrets.GH_TOKEN }} 49 | # REPO_NAME: ${{ github.event.repository.name }} 50 | # run: | 51 | # $xml = [xml](Get-Content ${{env.PROJECT_NAME}}) 52 | # $version = $xml.Project.PropertyGroup.Version 53 | # $notes = $xml.Project.PropertyGroup.PackageReleaseNotes 54 | # $repo = $env:GITHUB_REPOSITORY 55 | # gh release create "v$version" -t "${{ env.REPO_NAME}}-v${version}" -n "${notes}" -R "$repo" 56 | # Compress-Archive -Path ".\bin\Release\*" -DestinationPath ".\bin\Release\${{ env.REPO_NAME }}-v${version}.zip" 57 | # gh release upload "v${version}" .\bin\Release\${{ env.REPO_NAME }}-v${version}.zip --clobber 58 | # working-directory: ${{ env.PATH_PROJECT }} -------------------------------------------------------------------------------- /docs/docs/repository-pattern-getting-started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | To get started with **EFCore.RepositoryPattern**, follow these simple steps: 4 | 5 | ## Install the Package 6 | 7 | You can install the library via NuGet Package Manager Console: 8 | 9 | ```sh 10 | Install-Package Qrtix.EFCore.RepositoryPattern 11 | ``` 12 | 13 | Or use the NuGet Package Manager 14 | 15 | 1. Open your project in Visual Studio. 16 | 2. Right-click on your project in Solution Explorer. 17 | 3. Select "Manage NuGet Packages..." 18 | 4. Search for "Qrtix.EFCore.RepositoryPattern" in the NuGet Package Manager. 19 | 5. Click on "Install" to add the package to your project. 20 | 21 | Or use the .NET CLI: 22 | 23 | ```sh 24 | dotnet add package Qrtix.EFCore.Converters 25 | ``` 26 | 27 | ## Usage 28 | 29 | Once you have installed the EFCore.RepositoryPattern package, you can start using its repository pattern implementation 30 | in your application. 31 | 32 | ### 1. Define your Entity classes: 33 | 34 | Define your entity classes that represent the tables in your database. These classes will be used with the repositories 35 | provided by EFCore.RepositoryPattern. 36 | 37 | ```csharp 38 | public class Product 39 | { 40 | public int Id { get; set; } 41 | public string Name { get; set; } 42 | public decimal Price { get; set; } 43 | } 44 | ``` 45 | 46 | ### 2. Create DbContext: 47 | 48 | Create a subclass of DbContext from Entity Framework Core and configure it to work with your database. This class will 49 | be used to instantiate the repositories and unit of work. 50 | 51 | ```csharp 52 | public class AppDbContext : DbContext 53 | { 54 | public DbSet Products { get; set; } 55 | 56 | public AppDbContext(DbContextOptions options) : base(options) 57 | { 58 | } 59 | } 60 | ``` 61 | 62 | ### 3. Inject Dependencies: 63 | 64 | Inject the required dependencies into your application's services using the `AddRepositoryPattern` method in the program 65 | class: 66 | 67 | ```csharp 68 | builder.Services.AddDbContext(options => 69 | options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"))); 70 | 71 | builder.Services.AddRepositoryPattern(); 72 | ``` 73 | 74 | ### 4. Use Repositories: 75 | 76 | Use the injected repository or the unit of work instances to perform database operations such as querying, inserting, 77 | updating, and deleting entities. 78 | 79 | ```csharp 80 | // Using the injectod UnitOfWork 81 | public class ProductService 82 | { 83 | private readonly IUnitOfWork _unitOfWork; 84 | 85 | public ProductService(IUnitOfWork unitOfWork) 86 | { 87 | _unitOfWork = unitOfWork; 88 | } 89 | 90 | public async Task> GetProductsAsync() 91 | { 92 | return await _unitOfWork.Repository.GetManyAsync(); 93 | } 94 | 95 | // Other methods for CRUD operations, transaction management, etc. 96 | } 97 | 98 | // Using the injected Repository 99 | public class ProductService 100 | { 101 | private readonly IRepository _productRepository; 102 | 103 | public ProductService(IRepository productRepository) 104 | { 105 | _productRepository = productRepository; 106 | } 107 | 108 | public async Task> GetProductsAsync() 109 | { 110 | return await _productRepository.GetManyAsync(); 111 | } 112 | 113 | // Other methods for CRUD operations, transaction management, etc. 114 | } 115 | ``` -------------------------------------------------------------------------------- /docs/docs/repository-pattern-introduction.md: -------------------------------------------------------------------------------- 1 | # Introduction to EFCore.RepositoryPattern 2 | 3 | Welcome to the EFCore.RepositoryPattern documentation! This library provides a flexible and efficient solution for 4 | implementing the repository pattern with Entity Framework Core (EF Core) in .NET applications. By leveraging the 5 | repository pattern, developers can achieve cleaner and more maintainable code architectures while abstracting away the 6 | complexities of data access. 7 | 8 | ## What is the Repository Pattern? 9 | 10 | The repository pattern is a design pattern commonly used in software development to separate the logic that retrieves 11 | data from a data source from the rest of the application's business logic. It acts as an intermediary layer between the 12 | application's business logic and the data source (such as a database), providing a consistent interface for accessing 13 | and managing data. 14 | 15 | ## Key Features of EFCore.RepositoryPattern: 16 | 17 | 1. **Abstraction of Data Access Logic:** EFCore.RepositoryPattern abstracts away the details of data access logic by 18 | providing generic repository interfaces and implementations. This allows developers to focus on writing 19 | application-specific logic without worrying about the intricacies of database operations. 20 | 21 | 2. **Modularity and Extensibility:** The library promotes modularity and extensibility by offering interfaces for 22 | repositories and units of work, allowing developers to easily swap out implementations or add custom logic as needed. 23 | 24 | 3. **Integration with Entity Framework Core:** Built on top of Entity Framework Core, EFCore.RepositoryPattern 25 | seamlessly integrates with EF Core's DbContext and DbSet functionalities, providing a familiar and efficient way to 26 | interact with databases. 27 | 28 | 4. **Transaction Management:** EFCore.RepositoryPattern includes transaction management capabilities, allowing 29 | developers to manage database transactions with ease, including support for save points. 30 | 31 | 5. **Async Support:** The library fully supports asynchronous database operations, enabling developers to build 32 | high-performance applications that can handle concurrent requests efficiently. 33 | 34 | ## Getting Started: 35 | 36 | To start using EFCore.RepositoryPattern in your .NET applications, simply install the `EFCore.RepositoryPattern` package 37 | via NuGet Package Manager. Once installed, you can begin using the provided repository 38 | interfaces (`IRepository`) and unit of work interface (`IUnitOfWork`) to interact with your database in a 39 | structured and modular manner. 40 | 41 | Consult the [Getting Started](https://carlosjortiz.github.io/EFCore/docs/repository-pattern-getting-started.html) section for more details. 42 | 43 | ## How to Use This Documentation: 44 | 45 | This documentation serves as a comprehensive guide for understanding and using EFCore.RepositoryPattern effectively in 46 | your projects. It includes installation instructions, usage examples, API references, advanced topics, troubleshooting 47 | tips, and more. 48 | 49 | Whether you are a beginner exploring the repository pattern for the first time or an experienced developer looking for 50 | ways to optimize your data access layer, this documentation aims to provide you with the knowledge and resources needed 51 | to leverage EFCore.RepositoryPattern to its fullest potential. 52 | 53 | Thank you for choosing EFCore.RepositoryPattern! We hope you find this library valuable in simplifying your data access 54 | logic and improving the overall maintainability and scalability of your applications. If you have any questions, 55 | feedback, or feature requests, please don't hesitate to reach out to us. Happy coding! 56 | -------------------------------------------------------------------------------- /src/EFCore.Converters/README.md: -------------------------------------------------------------------------------- 1 | # Entity Framework Core Converters 2 | 3 | ![NuGet Version](https://img.shields.io/nuget/v/Qrtix.EFCore.Converters?logo=nuget) 4 | ![NuGet Downloads](https://img.shields.io/nuget/dt/Qrtix.EFCore.Converters?style=flat&logo=nuget) 5 | ![GitHub Repo stars](https://img.shields.io/github/stars/carlosjortiz/EFCore?style=flat&logo=github) 6 | 7 | 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. 8 | 9 | Consult the online [documentation](https://carlosjortiz.github.io/EFCore/) for more details. 10 | 11 | ## Table of Contents 12 | 13 | - [Installation](#installation) 14 | - [Converters](#converters) 15 | - [Integrating the Converters](#integrating-the-converters) 16 | - [Contributing](#contributing) 17 | 18 | ## Installation 19 | 20 | ### NuGet Package Manager 21 | 22 | 1. Open your project in Visual Studio. 23 | 2. Right-click on your project in Solution Explorer. 24 | 3. Select "Manage NuGet Packages..." 25 | 4. Search for "Qrtix.EFCore.Converters" in the NuGet Package Manager. 26 | 5. Click on "Install" to add the package to your project. 27 | 28 | ### .NET CLI 29 | 30 | You can also install **Qrtix.EFCore.Converters** using the .NET CLI: 31 | 32 | ```sh 33 | dotnet add package Qrtix.EFCore.Converters 34 | ``` 35 | 36 | ## Converters 37 | 38 | | Converters | Description | 39 | |---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| 40 | | `TimeOnlyConverter` | Performs bidirectional conversion between the `TimeOnly` and `TimeSpan` types to enable Entity Framework Core compatibility with the `TimeOnly` struct. | 41 | | `DateOnlyConverter` | Performs bidirectional conversion between the `DateOnly` and `DateTime` types to enable Entity Framework Core compatibility with the `DateOnly` struct. | 42 | 43 | ## Integrating the converters 44 | 45 | ```csharp 46 | protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) 47 | { 48 | configurationBuilder.Properties().HaveConversion().HaveColumnType("time"); 49 | configurationBuilder.Properties().HaveConversion().HaveColumnType("date"); 50 | 51 | // add converters as you need 52 | 53 | base.ConfigureConventions(configurationBuilder); 54 | } 55 | ``` 56 | 57 | ## Contributing 58 | 59 | **Did you find a bug?** 60 | 61 | - Ensure the bug was not already reported by searching on GitHub 62 | under [Issues](https://github.com/carlosjortiz/EFCore/issues). 63 | - If you're unable to find an open issue addressing the 64 | problem, [open a new one](https://github.com/carlosjortiz/EFCore/issues/new). Be sure to include a title and clear 65 | description, as much relevant information as possible, and a code sample or an executable test case demonstrating the 66 | expected behavior that is not occurring. 67 | 68 | **Did you write a patch that fixes a bug?** 69 | 70 | - Open a new GitHub pull request with the patch. 71 | - Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. 72 | 73 | **Do you intend to add a new feature or change an existing one?** 74 | 75 | - First suggest your change in the [EFCore ideas page](https://github.com/carlosjortiz/EFCore/discussions/categories/ideas) 76 | for discussion. 77 | - There are no fixed rules on what should and shouldn't be in this library, but some features are more valuable than 78 | others, and some require long-term maintenance that outweighs the value of the feature. So please get sign-off from 79 | the 80 | project leader (Carlos J. Ortiz) before putting in an excessive amount of work. 81 | 82 | **Do you have questions about the source code?** 83 | 84 | - Ask any question about how to use EFCore in 85 | the [EFCore discussion page](https://github.com/carlosjortiz/EFCore/discussions/new?category=q-a). -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | _layout: landing 3 | --- 4 | 5 | # Introduction 6 | 7 | ![GitHub Repo stars](https://img.shields.io/github/stars/carlosjortiz/EFCore?style=flat&logo=github) 8 | 9 | **EFCore.Converters** 10 | 11 | ![NuGet Version](https://img.shields.io/nuget/v/Qrtix.EFCore.Converters?logo=nuget) 12 | ![NuGet Downloads](https://img.shields.io/nuget/dt/Qrtix.EFCore.Converters?style=flat&logo=nuget&label=EFCore.Converters) 13 | 14 | 15 | Welcome to the documentation for EFCore libraries! This documentation serves as a comprehensive guide to using these 16 | libraries effectively in your .NET projects. Whether you're a beginner looking to get started or 17 | an experienced developer seeking to streamline database operations, you'll find everything you need to know right here. 18 | 19 | Consult the online [documentation](https://carlosjortiz.github.io/EFCore/) for more details. 20 | 21 | - [About EFCore.Converters](#about-efcoreconverters) 22 | - [What You'll Find in This Documentation](#what-youll-find-in-this-documentation) 23 | - [Contributing](#contributing) 24 | 25 | ## About `EFCore.Converters` 26 | 27 | `EFCore.Converters` is a library designed to simplify the process of working with complex data types when using Entity 28 | Framework Core (EF Core). It provides a set of custom value converters that allow you to map .NET types to database 29 | columns, facilitating seamless storage and retrieval of data in your EF Core applications. With `EFCore.Converters`, you 30 | can easily handle scenarios involving enums, JSON data, spatial data types, and more, making your database interactions 31 | more efficient and intuitive. 32 | 33 | [EFCore.Converters README](src/EFCore.Converters/README.md) 34 | 35 | ## What You'll Find in This Documentation 36 | 37 | In this documentation, you'll discover detailed explanations, code samples, and practical tutorials covering various 38 | aspects of `EFCore.Converters` and `EFCore.RepositoryPattern`. Here's what you can expect to find: 39 | 40 | - **Installation Guide:** Learn how to install and configure the libraries in your .NET projects. 41 | - **Getting Started:** Get up and running quickly with step-by-step instructions for basic usage. 42 | - **Advanced Usage and Tutorials:** Dive deeper into advanced features and scenarios, with hands-on tutorials and 43 | examples. 44 | - **API Reference:** Explore the complete API documentation for both libraries, including classes, methods, and 45 | properties. 46 | - **Best Practices:** Discover best practices, tips, and recommendations for optimizing your usage. 47 | 48 | Whether you're building a small application or a large-scale enterprise system, These libraries are powerful tools that 49 | can help you achieve your goals efficiently and effectively. Let's dive 50 | in and explore the capabilities of these libraries together! 51 | 52 | ## Contributing 53 | 54 | **Did you find a bug?** 55 | 56 | - Ensure the bug was not already reported by searching on GitHub 57 | under [Issues](https://github.com/carlosjortiz/EFCore/issues). 58 | - If you're unable to find an open issue addressing the 59 | problem, [open a new one](https://github.com/carlosjortiz/EFCore/issues/new). Be sure to include a title and clear 60 | description, as much relevant information as possible, and a code sample or an executable test case demonstrating the 61 | expected behavior that is not occurring. 62 | 63 | **Did you write a patch that fixes a bug?** 64 | 65 | - Open a new GitHub pull request with the patch. 66 | - Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. 67 | 68 | **Do you intend to add a new feature or change an existing one?** 69 | 70 | - First suggest your change in the [EFCore ideas page](https://github.com/carlosjortiz/EFCore/discussions/categories/ideas) 71 | for discussion. 72 | - There are no fixed rules on what should and shouldn't be in this library, but some features are more valuable than 73 | others, and some require long-term maintenance that outweighs the value of the feature. So please get sign-off from 74 | the 75 | project leader (Carlos J. Ortiz) before putting in an excessive amount of work. 76 | 77 | **Do you have questions about the source code?** 78 | 79 | - Ask any question about how to use EFCore in 80 | the [EFCore discussion page](https://github.com/carlosjortiz/EFCore/discussions/new?category=q-a). 81 | 82 | If you have any questions or need further assistance, don't hesitate to reach out to us. 83 | 84 | Happy coding! -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | ![NuGet Version](https://img.shields.io/nuget/v/Qrtix.EFCore.Converters?logo=nuget&label=EFCore.Converters) 4 | ![NuGet Version](https://img.shields.io/nuget/v/Qrtix.EFCore.RepositoryPattern?style=flat&logo=nuget&label=EFCore.RepositoryPattern) 5 | ![GitHub Repo stars](https://img.shields.io/github/stars/carlosjortiz/EFCore?style=flat&logo=github) 6 | 7 | 8 | Welcome to the documentation for EFCore libraries! This documentation serves as a comprehensive guide to using these 9 | libraries effectively in your .NET projects. Whether you're a beginner looking to get started with `EFCore.Converters` or 10 | an experienced developer seeking to streamline database operations with `EFCore.RepositoryPattern`, you'll find everything 11 | you need to know right here. 12 | 13 | Consult the online [documentation](https://carlosjortiz.github.io/EFCore/) for more details. 14 | 15 | - [About EFCore.Converters](#about-efcoreconverters) 16 | - [About EFCore.RepositoryPattern](#about-efcorerepositorypattern) 17 | - [What You'll Find in This Documentation](#what-youll-find-in-this-documentation) 18 | - [Contributing](#contributing) 19 | 20 | ## About `EFCore.Converters` 21 | 22 | `EFCore.Converters` is a library designed to simplify the process of working with complex data types when using Entity 23 | Framework Core (EF Core). It provides a set of custom value converters that allow you to map .NET types to database 24 | columns, facilitating seamless storage and retrieval of data in your EF Core applications. With `EFCore.Converters`, you 25 | can easily handle scenarios involving enums, JSON data, spatial data types, and more, making your database interactions 26 | more efficient and intuitive. 27 | 28 | [EFCore.Converters README](src/EFCore.Converters/README.md) 29 | 30 | ## About `EFCore.RepositoryPattern` 31 | 32 | `EFCore.RepositoryPattern` is a library that implements the repository pattern on top of Entity Framework Core (EF Core), 33 | providing a structured approach to database access and management. By decoupling your application's data access logic 34 | from the underlying data source, `EFCore.RepositoryPattern` promotes modularity, testability, and maintainability. With 35 | this library, you can create and use repositories to perform CRUD (Create, Read, Update, Delete) operations, manage 36 | transactions, and execute custom queries, all while adhering to best practices in software architecture. 37 | 38 | [EFCore.RepositoryPattern README](src/EFCore.RepositoryPattern/README.md) 39 | 40 | ## What You'll Find in This Documentation 41 | 42 | In this documentation, you'll discover detailed explanations, code samples, and practical tutorials covering various 43 | aspects of `EFCore.Converters` and `EFCore.RepositoryPattern`. Here's what you can expect to find: 44 | 45 | - **Installation Guide:** Learn how to install and configure the libraries in your .NET projects. 46 | - **Core Concepts:** Understand the fundamental concepts and principles behind `EFCore.Converters` and 47 | `EFCore.RepositoryPattern`. 48 | - **Getting Started:** Get up and running quickly with step-by-step instructions for basic usage. 49 | - **Advanced Usage and Tutorials:** Dive deeper into advanced features and scenarios, with hands-on tutorials and 50 | examples. 51 | - **API Reference:** Explore the complete API documentation for both libraries, including classes, methods, and 52 | properties. 53 | - **Best Practices:** Discover best practices, tips, and recommendations for optimizing your usage of `EFCore.Converters` 54 | and `EFCore.RepositoryPattern`. 55 | 56 | Whether you're building a small application or a large-scale enterprise system, `EFCore.Converters` and 57 | `EFCore.RepositoryPattern` are powerful tools that can help you achieve your goals efficiently and effectively. Let's dive 58 | in and explore the capabilities of these libraries together! 59 | 60 | ## Contributing 61 | 62 | **Did you find a bug?** 63 | 64 | - Ensure the bug was not already reported by searching on GitHub 65 | under [Issues](https://github.com/carlosjortiz/EFCore/issues). 66 | - If you're unable to find an open issue addressing the 67 | problem, [open a new one](https://github.com/carlosjortiz/EFCore/issues/new). Be sure to include a title and clear 68 | description, as much relevant information as possible, and a code sample or an executable test case demonstrating the 69 | expected behavior that is not occurring. 70 | 71 | **Did you write a patch that fixes a bug?** 72 | 73 | - Open a new GitHub pull request with the patch. 74 | - Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. 75 | 76 | **Do you intend to add a new feature or change an existing one?** 77 | 78 | - First suggest your change in the [EFCore ideas page](https://github.com/carlosjortiz/EFCore/discussions/categories/ideas) 79 | for discussion. 80 | - There are no fixed rules on what should and shouldn't be in this library, but some features are more valuable than 81 | others, and some require long-term maintenance that outweighs the value of the feature. So please get sign-off from 82 | the 83 | project leader (Carlos J. Ortiz) before putting in an excessive amount of work. 84 | 85 | **Do you have questions about the source code?** 86 | 87 | - Ask any question about how to use EFCore in 88 | the [EFCore discussion page](https://github.com/carlosjortiz/EFCore/discussions/new?category=q-a). 89 | 90 | 91 | If you have any questions or need further assistance, don't hesitate to reach out to us. 92 | 93 | Happy coding! --------------------------------------------------------------------------------