AugusteVN.Modules.Auth.Database.EfCore 1.0.7

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

AugusteVN.Modules.Auth.Database.EfCore

EF Core AuthDbContext with ASP.NET Identity entities, audit tracking, and seed data for the Auth module.

DbContext

AuthDbContext

Extends IdentityDbContext<User, Role, string>. Implements IAuthDbContext.

DbSets:

  • RolePermissionsDbSet<RolePermission>

Behavior:

  • Uses QueryTrackingBehavior.NoTracking by default
  • Automatically sets CreatedBy/CreatedAt on insert and LastModifiedBy/LastModifiedAt on update for User, Role, and AuditableEntity tracked entries
  • Migrations assembly is set to the Database project; migration history table is prefixed Auth_EFMigrationHistory

Entities

  • User — Extends IdentityUser, implements IAuthUser with: Name, CreatedAt, CreatedBy, LastModifiedAt, LastModifiedBy
  • Role — Extends IdentityRole, implements IAuthRole with: Permissions (collection of RolePermission), Description, Type, CreatedAt, CreatedBy, LastModifiedAt, LastModifiedBy
  • RolePermission — Extends AuditableEntity with: Scope (string), Sum (int bitmask), RoleId (string FK)

Interface

IAuthDbContext — Exposes RolePermissions DbSet and SaveChangesAsync via ISaveChangesAsync.

Extension Method

AddAuthDbContextEfCore(this IServiceCollection, IConfiguration) — Registers IAuthDbContext / AuthDbContext with SQL Server using the DefaultConnection connection string.

Registration

builder.Services.AddAuthDbContextEfCore(builder.Configuration);

Seed Data

The Seeder class provides ModelBuilder extension methods for initial data:

  • SeedRoles — Seeds an Administrator role
  • SeedRolePermissions — Grants Permissions.All on the Auth scope to the Administrator role
  • SeedUsers — Seeds admin@test.com with password Test1234
  • SeedUserRoles — Assigns the Administrator role to the seeded user

Migration Commands

# Create migration
dotnet ef migrations add <Name> --project ./Src/Auth/AugusteVN.Modules.Auth.Database.EfCore --startup-project <YourStartupProject> --context AuthDbContext

# Apply migrations
dotnet ef database update --project ./Src/Auth/AugusteVN.Modules.Auth.Database.EfCore --startup-project <YourStartupProject> --context AuthDbContext

Installation

dotnet add package AugusteVN.Modules.Auth.Database.EfCore

Full Documentation

See the Auth Module README for complete documentation.

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 AugusteVN.Modules.Auth.Database.EfCore:

Package Downloads
AugusteVN.Modules.Auth.Api

Minimal API endpoints for authentication, identity, roles, and user management

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.7 87 8/9/2026
1.0.4 82 8/9/2026
1.0.3 83 8/9/2026
1.0.2 91 8/8/2026
1.0.1 79 8/8/2026
1.0.0 88 8/8/2026