Enigmatry.Entry.EntityFramework
9.1.1-preview.4
This is a prerelease version of Enigmatry.Entry.EntityFramework.
dotnet add package Enigmatry.Entry.EntityFramework --version 9.1.1-preview.4
NuGet\Install-Package Enigmatry.Entry.EntityFramework -Version 9.1.1-preview.4
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="Enigmatry.Entry.EntityFramework" Version="9.1.1-preview.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Enigmatry.Entry.EntityFramework" Version="9.1.1-preview.4" />
<PackageReference Include="Enigmatry.Entry.EntityFramework" />
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 Enigmatry.Entry.EntityFramework --version 9.1.1-preview.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Enigmatry.Entry.EntityFramework, 9.1.1-preview.4"
#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.
#addin nuget:?package=Enigmatry.Entry.EntityFramework&version=9.1.1-preview.4&prerelease
#tool nuget:?package=Enigmatry.Entry.EntityFramework&version=9.1.1-preview.4&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Entity Framework Core Extensions
A library that provides extensions and utilities for working with Entity Framework Core, enhancing the ORM capabilities with additional features and patterns.
Intended Usage
Use this library to implement common Entity Framework Core patterns and extensions, such as repositories, unit of work, auditing, and soft delete functionality.
Installation
Add the package to your project:
dotnet add package Enigmatry.Entry.EntityFramework
Usage Example
Creating a repository:
using Enigmatry.Entry.Core.Entities;
using Enigmatry.Entry.EntityFramework;
using Microsoft.EntityFrameworkCore;
// Define an entity
public class Customer : EntityWithTypedId<Guid>
{
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public bool IsActive { get; set; }
}
// Create a DbContext
public class ApplicationDbContext : BaseDbContext
{
public DbSet<Customer> Customers { get; set; } = default!;
public ApplicationDbContext(DbContextOptions options, EntitiesDbContextOptions entitiesDbContextOptions)
: base(entitiesDbContextOptions, options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
// Model builder is configured through base class
}
}
// Use the repository pattern
public interface ICustomerRepository : IRepository<Customer, Guid>
{
Task<Customer?> FindByEmailAsync(string email);
}
public class CustomerRepository : EntityFrameworkRepository<Customer, Guid>, ICustomerRepository
{
public CustomerRepository(ApplicationDbContext dbContext)
: base(dbContext)
{
}
public async Task<Customer?> FindByEmailAsync(string email)
{
return await DbSet
.FirstOrDefaultAsync(c => c.Email == email && c.IsActive);
}
}
Dependency Injection Example
Register Entity Framework services:
using Enigmatry.Entry.Core.Data;
using Enigmatry.Entry.EntityFramework;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// Configure EntitiesDbContextOptions
var entitiesOptions = new EntitiesDbContextOptions
{
ConfigurationAssembly = typeof(Customer).Assembly
};
services.AddSingleton(entitiesOptions);
// Register DbContext
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
// Register repositories
services.AddScoped<ICustomerRepository, CustomerRepository>();
// Add unit of work
services.AddScoped<IUnitOfWork, EntityFrameworkUnitOfWork>();
// Register DbContext as the concrete DbContext implementation for the unit of work
services.AddScoped<DbContext>(sp => sp.GetRequiredService<ApplicationDbContext>());
}
}
Product | Versions 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.
-
net9.0
- Azure.Identity (>= 1.14.0)
- Enigmatry.Entry.Core.EntityFramework (>= 9.1.1-preview.4)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.5)
- System.Text.Json (>= 9.0.5)
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 |
---|---|---|
9.1.1-preview.4 | 79 | 6/27/2025 |
9.1.1-preview.3 | 114 | 6/4/2025 |
9.1.0 | 299 | 6/3/2025 |
9.0.1-preview.8 | 126 | 5/26/2025 |
9.0.1-preview.7 | 206 | 5/13/2025 |
9.0.1-preview.6 | 195 | 5/9/2025 |
9.0.1-preview.5 | 141 | 5/7/2025 |
9.0.1-preview.4 | 116 | 4/30/2025 |
9.0.1-preview.2 | 123 | 4/1/2025 |
9.0.0 | 855 | 2/26/2025 |
8.1.1-preview.3 | 114 | 5/7/2025 |
8.1.1-preview.1 | 131 | 4/1/2025 |
8.1.0 | 608 | 2/19/2025 |
8.0.1-preview.4 | 73 | 2/7/2025 |
8.0.1-preview.2 | 60 | 1/15/2025 |
8.0.0 | 1,159 | 11/27/2024 |
3.4.6-preview.10 | 62 | 11/27/2024 |
3.4.3 | 1,962 | 10/22/2024 |
3.4.2 | 705 | 10/11/2024 |
3.4.1 | 124 | 10/9/2024 |
3.4.0 | 121 | 10/9/2024 |
3.3.2 | 489 | 8/28/2024 |
3.3.2-preview.7 | 88 | 8/27/2024 |
3.3.1 | 406 | 7/16/2024 |
3.3.1-preview.4 | 67 | 7/12/2024 |
3.3.0 | 1,127 | 6/20/2024 |
3.2.1-preview.4 | 65 | 6/17/2024 |
3.2.1-preview.1 | 67 | 5/23/2024 |
3.2.0 | 3,859 | 4/3/2024 |
3.1.1-preview.1 | 1,012 | 3/13/2024 |
3.1.0 | 463 | 3/8/2024 |
3.1.0-preview.2 | 434 | 2/19/2024 |
3.0.1-preview.2 | 1,153 | 2/9/2024 |
3.0.1-preview.1 | 86 | 1/24/2024 |
3.0.0 | 1,271 | 1/15/2024 |
3.0.0-preview.14 | 139 | 1/9/2024 |
3.0.0-preview.12 | 73 | 1/9/2024 |
3.0.0-preview.5 | 79 | 1/10/2024 |
3.0.0-preview.2 | 145 | 12/28/2023 |
3.0.0-preview | 153 | 12/20/2023 |
2.1.0 | 171 | 12/28/2023 |
2.0.1-preview.3 | 116 | 12/1/2023 |
2.0.1-preview.2 | 83 | 11/29/2023 |
2.0.1-preview.1 | 85 | 11/28/2023 |
2.0.0 | 460 | 11/8/2023 |
2.0.0-preview.3 | 464 | 10/27/2023 |
2.0.0-preview.2 | 82 | 10/27/2023 |
2.0.0-preview.1 | 86 | 10/27/2023 |
2.0.0-preview | 140 | 10/27/2023 |
1.1.500 | 169 | 10/27/2023 |
1.1.495 | 214 | 9/24/2023 |
1.1.486 | 465 | 9/13/2023 |
1.1.484 | 221 | 9/7/2023 |
1.1.482 | 170 | 9/6/2023 |
1.1.480 | 314 | 8/24/2023 |
1.1.477 | 502 | 8/2/2023 |
1.1.464 | 194 | 7/5/2023 |
1.1.447 | 855 | 5/26/2023 |
1.1.396 | 283 | 4/11/2023 |
1.1.383 | 272 | 4/3/2023 |
1.1.377 | 268 | 3/13/2023 |
1.1.376 | 239 | 3/13/2023 |
1.1.365 | 972 | 2/15/2023 |