Jezda.Common.Data 1.0.35

dotnet add package Jezda.Common.Data --version 1.0.35
                    
NuGet\Install-Package Jezda.Common.Data -Version 1.0.35
                    
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="Jezda.Common.Data" Version="1.0.35" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jezda.Common.Data" Version="1.0.35" />
                    
Directory.Packages.props
<PackageReference Include="Jezda.Common.Data" />
                    
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 Jezda.Common.Data --version 1.0.35
                    
#r "nuget: Jezda.Common.Data, 1.0.35"
                    
#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 Jezda.Common.Data@1.0.35
                    
#: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=Jezda.Common.Data&version=1.0.35
                    
Install as a Cake Addin
#tool nuget:?package=Jezda.Common.Data&version=1.0.35
                    
Install as a Cake Tool

Jezda.Common.Data

Production-ready implementations of Repository Pattern, Unit of Work, and Specification Pattern for Entity Framework Core.

📦 Installation

dotnet add package Jezda.Common.Data

🎯 What's Included

GenericRepository<T>

A comprehensive repository implementation with 50+ methods:

  • CRUD Operations - Add, Update, Remove, GetById
  • Queries - Get, GetFirstOrDefault, filtering, projections
  • Pagination - PagedList support with sorting and searching
  • AsNoTracking - Read-only queries for better performance
  • Soft Delete - SoftDelete/Restore with IDeletedEntity
  • Batch Operations - ExecuteDeleteAsync, ExecuteUpdateAsync (EF Core 7+)
  • Specification Pattern - Reusable query specifications
  • Aggregates - Sum, Average, Min, Max
  • Helpers - Exists, Count, Any, All, Detach, Reload, Upsert

UnitOfWork<TContext>

  • Transaction management
  • Coordinate SaveChanges across multiple repositories
  • DbContext lifecycle management

💡 Quick Start

// 1. Create repository
public class ProductRepository : GenericRepository<Product>
{
    public ProductRepository(AppDbContext context) : base(context) { }
}

// 2. Register in DI
builder.Services.AddScoped<IUnitOfWork<AppDbContext>, UnitOfWork<AppDbContext>>();
builder.Services.AddScoped<IGenericRepository<Product>, ProductRepository>();

// 3. Use in services
public class ProductService
{
    private readonly IUnitOfWork<AppDbContext> _unitOfWork;
    private readonly IGenericRepository<Product> _repository;

    public async Task<Product> CreateAsync(Product product)
    {
        _repository.Add(product);
        await _unitOfWork.SaveChangesAsync();
        return product;
    }

    public async Task<PagedList<Product>> GetPagedAsync(PagingInfo paging)
    {
        return await _repository.GetPagedItemsAsync(paging);
    }
}

🚀 Key Features

Specification Pattern

public class ActiveProductsSpec : BaseSpecification<Product>
{
    public ActiveProductsSpec(decimal minPrice)
        : base(x => x.IsActive && x.Price >= minPrice)
    {
        AddInclude(x => x.Category);
        ApplyOrderBy(x => x.Name);
        ApplyAsNoTracking();
    }
}

var products = await _repository.GetBySpecAsync(new ActiveProductsSpec(100m));

Batch Operations (10-100x faster)

// Bulk delete
await _repository.DeleteWhereAsync(x => x.IsActive == false);

// Bulk update
await _repository.UpdateWhereAsync(
    where: x => x.CategoryId == oldId,
    setters: s => s.SetProperty(p => p.CategoryId, newId)
);

Soft Delete

var product = await _repository.GetByIdAsync(1);
_repository.SoftDelete(product);
await _unitOfWork.SaveChangesAsync();
// Product.IsDeleted = true

📚 Documentation

For complete documentation with examples, see the main repository README.

🔗 Dependencies

  • Jezda.Common.Abstractions - Repository and UoW interfaces
  • Jezda.Common.Extensions - Extension methods
  • Entity Framework Core 9.0.8

📄 License

MIT License - see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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

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.35 95 2/17/2026
1.0.34 417 11/27/2025
1.0.33 280 11/24/2025
1.0.32 193 11/23/2025
1.0.31 206 11/7/2025
1.0.30 207 10/31/2025
1.0.29 250 10/27/2025
1.0.28 206 10/23/2025
1.0.27 169 10/17/2025
1.0.26 185 10/16/2025
1.0.25 211 10/15/2025
1.0.24 197 10/14/2025
1.0.23 198 10/14/2025
1.0.22 198 10/2/2025
1.0.21 200 9/11/2025
1.0.20 202 9/11/2025
1.0.19 293 8/18/2025
1.0.18 146 8/16/2025
1.0.17 200 8/13/2025
1.0.16 195 8/10/2025
Loading failed