TCIS.Persistence.EntityFrameworkCore 1.0.0-rc.10

This is a prerelease version of TCIS.Persistence.EntityFrameworkCore.
dotnet add package TCIS.Persistence.EntityFrameworkCore --version 1.0.0-rc.10
                    
NuGet\Install-Package TCIS.Persistence.EntityFrameworkCore -Version 1.0.0-rc.10
                    
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="TCIS.Persistence.EntityFrameworkCore" Version="1.0.0-rc.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TCIS.Persistence.EntityFrameworkCore" Version="1.0.0-rc.10" />
                    
Directory.Packages.props
<PackageReference Include="TCIS.Persistence.EntityFrameworkCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TCIS.Persistence.EntityFrameworkCore --version 1.0.0-rc.10
                    
#r "nuget: TCIS.Persistence.EntityFrameworkCore, 1.0.0-rc.10"
                    
#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.
#:package TCIS.Persistence.EntityFrameworkCore@1.0.0-rc.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TCIS.Persistence.EntityFrameworkCore&version=1.0.0-rc.10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TCIS.Persistence.EntityFrameworkCore&version=1.0.0-rc.10&prerelease
                    
Install as a Cake Tool

TCIS.Persistence.EntityFrameworkCore

The library providing the intermediate core layer (Persistence Core) for databases using Entity Framework Core. The library encapsulates enterprise-grade standard Design Patterns such as GenericRepository, UnitOfWork (UoW), and common configurations for TCIS applications.

📦 Installation

dotnet add package TCIS.Persistence.EntityFrameworkCore

⚙️ Configuration (appsettings.json)

The library requires the ConfigurationStore section to be configured with connection strings:

{
  "ConfigurationStore": {
    "ConnectionString": "Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;",
    "ReadConnectionString": "Server=myReadReplica;Database=myDataBase;User Id=myUsername;Password=myPassword;" // Used for read-only tasks (optional)
  }
}

🚀 Registration / Setup (Program.cs)

Use the AddTCorePersistence extension method to automatically register DbContext, GenericRepository, EfUnitOfWork, and DapperContext.

using Microsoft.EntityFrameworkCore;
using System.Data.SqlClient;

var builder = WebApplication.CreateBuilder(args);

// Register the entire Persistence Layer Core
builder.Services.AddTCorePersistence<MyApplicationDbContext>(
    configuration: builder.Configuration,
    dbConnectionCreator: connectionString => new SqlConnection(connectionString),
    dbOptionsAction: (sp, options) => {
        options.UseSqlServer("name=ConnectionStrings:DefaultConnection");
    });

💡 Usage

Once registered, you can inject IGenericRepository<TEntity> and IUnitOfWork into your Services.

using TCIS.Core.Abstractions.Repositories;

public class OrderService
{
    private readonly IGenericRepository<Order> _orderRepo;
    private readonly IUnitOfWork _unitOfWork;

    public OrderService(IGenericRepository<Order> orderRepo, IUnitOfWork unitOfWork)
    {
        _orderRepo = orderRepo;
        _unitOfWork = unitOfWork;
    }

    public async Task CreateOrderAsync(Order order)
    {
        await _orderRepo.AddAsync(order);
        
        // Save changes to the DB via EfUnitOfWork
        await _unitOfWork.SaveChangesAsync();
    }
}

Benefits:

  • Unit Of Work (EfUnitOfWork): Safely manages Transactions, ensuring data consistency.
  • Generic Repository: Provides basic CRUD operations out-of-the-box without needing to rewrite code for each Entity.
  • Built-in Dapper Integration: AddTCorePersistence will also register IDapperContext, allowing for raw SQL queries to optimize performance.
Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TCIS.Persistence.EntityFrameworkCore:

Package Downloads
TCIS.Pluggable.Persistence.EntityFrameworkCore

TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Pluggable Persistence EntityFrameworkCore

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-rc.10 39 7/24/2026
1.0.0-rc.9 56 7/21/2026
1.0.0-rc.8 53 7/21/2026
1.0.0-rc.7 55 7/17/2026