AuroraScienceHub.Framework.EntityFramework 10.0.5

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

AuroraScienceHub.Framework.EntityFramework

Entity Framework Core extensions and utilities for building data access layers with best practices built-in.

Overview

Provides base classes, interceptors, converters, and utilities for Entity Framework Core applications with automatic auditing, soft delete filters, and strong-typed ID support.

Key Features

  • Automatic Auditing - Auto-populate CreatedAt/UpdatedAt timestamps
  • Soft Delete Filters - Global query filters for soft-deleted entities
  • Strong-Typed ID Converters - Value converters for EntityId types
  • Migration Helpers - Simplified migration management
  • Query Extensions - Enhanced LINQ operations

Installation

dotnet add package AuroraScienceHub.Framework.EntityFramework

Usage

DbContext Setup

public class ApplicationDbContext : DbContext, IDataContext
{
    public static string Schema => "app";

    public DbSet<User> Users => Set<User>();

    public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
        : base(options)
    {
    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.HasDefaultSchema(Schema);
        modelBuilder.ApplyConfigurationsFromAssembly(GetType().Assembly);
    }
}

Automatic Auditing

// Configure with interceptor
builder.Services.AddDbContext<ApplicationDbContext>((sp, options) =>
{
    options.UseNpgsql(connectionString)
        .AddInterceptors(new AuditingInterceptor());
});

// Entity with auditing
public class User : IEntity<UserId>, IAuditable
{
    public UserId Id { get; private set; }
    public DateTime CreatedAt { get; set; }  // Auto-populated
    public DateTime UpdatedAt { get; set; }  // Auto-updated
}

Soft Delete

public class Product : IEntity<ProductId>, ISoftDeletable
{
    public ProductId Id { get; private set; }
    public bool IsDeleted { get; set; }
    public DateTime? DeletedAt { get; set; }
}

// Configure filter
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder.Entity<Product>()
        .HasQueryFilter(p => !p.IsDeleted);
}

// Deleted products are automatically excluded from queries
var products = await context.Products.ToListAsync();

Strong-Typed IDs

public sealed record UserId(Guid Value) : EntityId<Guid>(Value);

// Configure converter
builder.Property(u => u.Id)
    .HasConversion(
        id => id.Value,
        value => new UserId(value));

Repository Pattern

public class UserRepository
{
    private readonly ApplicationDbContext _context;

    public async Task<User?> GetByIdAsync(UserId id, CancellationToken ct = default)
    {
        return await _context.Users.FirstOrDefaultAsync(u => u.Id == id, ct);
    }

    public async Task AddAsync(User entity, CancellationToken ct = default)
    {
        await _context.Users.AddAsync(entity, ct);
        await _context.SaveChangesAsync(ct);
    }
}

License

See LICENSE file in the repository root.

  • AuroraScienceHub.Framework.Entities - Domain entity interfaces
  • AuroraScienceHub.Framework.EntityFramework.NpgSql - PostgreSQL-specific features
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 AuroraScienceHub.Framework.EntityFramework:

Package Downloads
AuroraScienceHub.Framework.EntityFramework.NpgSql

Entity Framework Core extensions for PostgreSQL with NetTopologySuite spatial support, naming conventions, and database factory patterns.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.5 914 4/23/2026
10.0.4 110 4/23/2026
10.0.3 432 2/11/2026
10.0.2 460 1/29/2026
10.0.1 491 12/25/2025
10.0.0 443 12/11/2025
9.0.7 2,028 11/20/2025
9.0.6 202 11/15/2025
9.0.5 254 11/8/2025
9.0.4 232 10/24/2025
9.0.3 222 10/15/2025
9.0.2 198 10/15/2025
9.0.1 382 10/14/2025
9.0.1-workflow-test-2.17 147 10/14/2025