Fermion.EntityFramework.Shared
1.0.1
dotnet add package Fermion.EntityFramework.Shared --version 1.0.1
NuGet\Install-Package Fermion.EntityFramework.Shared -Version 1.0.1
<PackageReference Include="Fermion.EntityFramework.Shared" Version="1.0.1" />
<PackageVersion Include="Fermion.EntityFramework.Shared" Version="1.0.1" />
<PackageReference Include="Fermion.EntityFramework.Shared" />
paket add Fermion.EntityFramework.Shared --version 1.0.1
#r "nuget: Fermion.EntityFramework.Shared, 1.0.1"
#:package Fermion.EntityFramework.Shared@1.0.1
#addin nuget:?package=Fermion.EntityFramework.Shared&version=1.0.1
#tool nuget:?package=Fermion.EntityFramework.Shared&version=1.0.1
Fermion.EntityFramework.Shared
Fermion.EntityFramework.Shared is a library that provides Entity Framework Core integration with advanced repository pattern implementation, query building, and data access utilities.
Features
- Repository pattern implementation
- Read/Write repository separation
- Query building support
- Pagination and sorting
- Soft delete filtering
- Audit logging
- Aggregate root support
- Model configuration
Installation
dotnet add package Fermion.EntityFramework.Shared
Content
Repository Pattern
Core Interfaces
IRepository<TEntity, TKey>
: Base repository interface- Basic CRUD operations
- Entity tracking
- Save changes
IReadRepository<TEntity, TKey>
: Read-only repository interface- Query operations
- Filtering
- Sorting
- Pagination
- Include support
- Projection support
IWriteRepository<TEntity, TKey>
: Write-only repository interface- Insert operations
- Update operations
- Delete operations
- Bulk operations
- Transaction support
Repository Implementations
EfRepositoryBase<TEntity, TKey>
: Base repository implementation- DbContext integration
- Entity tracking
- Change detection
- Concurrency handling
ReadRepository<TEntity, TKey>
: Read-only repository implementation- Query building
- Filtering
- Sorting
- Pagination
- Include support
- Projection support
WriteRepository<TEntity, TKey>
: Write-only repository implementation- Insert operations
- Update operations
- Delete operations
- Bulk operations
- Transaction support
Query Building
Queryable Extensions
ApplySort
: Applies sorting to queryable- Single field sorting
- Multiple field sorting
- Dynamic sorting support
ToPageableAsync
: Converts queryable to pageable resource- Page size control
- Page number control
- Total count calculation
- Pagination metadata
DTOs
Pagination
PageableResponseMetaDto
: Pagination metadata- Current page
- Page size
- Total pages
- Total items
PageableResourceDto<T>
: Pageable resource- Items
- Total count
- Pagination request
Sorting
SortRequestDto
: Sort request parameters- Field name
- Sort order
- Validation
SortOrderTypes
: Sort order types- Ascending
- Descending
Usage
Repository Implementation
public class UserRepository : EfRepositoryBase<User, Guid>, IUserRepository
{
public UserRepository(YourDbContext context) : base(context)
{
}
public async Task<User> GetByEmailAsync(string email)
{
return await Query.GetAsync(x => x.Email == email);
}
}
Features
- Repository pattern implementation
- Read/Write separation
- Query building
- Pagination and sorting
- Soft delete filtering
- Model configuration
- Concurrency handling
- Transaction support
Product | Versions 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. |
-
net8.0
- Fermion.Domain.Exceptions (>= 1.0.0)
- Fermion.Domain.Extensions (>= 1.0.0)
- Fermion.Domain.Shared (>= 1.0.1)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.EntityFrameworkCore (>= 9.0.3)
- System.Linq.Dynamic.Core (>= 1.6.2)
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 |
---|