Fermat.EntityFramework.Shared
0.0.2
dotnet add package Fermat.EntityFramework.Shared --version 0.0.2
NuGet\Install-Package Fermat.EntityFramework.Shared -Version 0.0.2
<PackageReference Include="Fermat.EntityFramework.Shared" Version="0.0.2" />
<PackageVersion Include="Fermat.EntityFramework.Shared" Version="0.0.2" />
<PackageReference Include="Fermat.EntityFramework.Shared" />
paket add Fermat.EntityFramework.Shared --version 0.0.2
#r "nuget: Fermat.EntityFramework.Shared, 0.0.2"
#:package Fermat.EntityFramework.Shared@0.0.2
#addin nuget:?package=Fermat.EntityFramework.Shared&version=0.0.2
#tool nuget:?package=Fermat.EntityFramework.Shared&version=0.0.2
Fermat.EntityFramework.Shared
Fermat.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 Fermat.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
- Fermat.Domain.Exceptions (>= 0.0.1)
- Fermat.Domain.Extensions (>= 0.0.1)
- Fermat.Domain.Shared (>= 0.0.1)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.EntityFrameworkCore (>= 9.0.7)
- System.Linq.Dynamic.Core (>= 1.6.2)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Fermat.EntityFramework.Shared:
Package | Downloads |
---|---|
Fermat.EntityFramework.HttpRequestLogs
A library for managing HTTP request logs in .NET applications using Entity Framework Core. |
|
Fermat.EntityFramework.AuditLogs
A library that provides a comprehensive set of abstractions, base classes, and utilities for implementing audit logging in .NET applications. |
|
Fermat.EntityFramework.SnapshotLogs
A Fermat package for logging HTTP requests using Entity Framework. |
|
Fermat.EntityFramework.ExceptionLogs
A Fermat package for logging exceptions in Entity Framework Core using a database. |
|
Fermat.EntityFramework.Identity
A Fermat package for integrating Entity Framework Core with Identity. |
GitHub repositories
This package is not used by any popular GitHub repositories.