Table of Contents

Class AuthDbContext

Namespace
KadicAuth.Infrastructure
Assembly
KadicAuth.Infrastructure.dll
public class AuthDbContext : DbContext
Inheritance
object
DbContext
AuthDbContext

Constructors

AuthDbContext(DbContextOptions<AuthDbContext>, ITenantIdContext)

public AuthDbContext(DbContextOptions<AuthDbContext> options, ITenantIdContext tenantIdContext)

Parameters

options DbContextOptions<AuthDbContext>
tenantIdContext ITenantIdContext

Properties

LoginAttempts

public DbSet<LoginAttempt> LoginAttempts { get; }

Property Value

DbSet<LoginAttempt>

Modules

public DbSet<Module> Modules { get; }

Property Value

DbSet<Module>

PasswordResetTokens

public DbSet<PasswordResetToken> PasswordResetTokens { get; }

Property Value

DbSet<PasswordResetToken>

Permissions

public DbSet<Permission> Permissions { get; }

Property Value

DbSet<Permission>

Plans

public DbSet<Plan> Plans { get; }

Property Value

DbSet<Plan>

PlatformAdminAuditLog

public DbSet<PlatformAdminAuditLogEntry> PlatformAdminAuditLog { get; }

Property Value

DbSet<PlatformAdminAuditLogEntry>

PlatformAdmins

public DbSet<PlatformAdmin> PlatformAdmins { get; }

Property Value

DbSet<PlatformAdmin>

RefreshTokens

public DbSet<RefreshToken> RefreshTokens { get; }

Property Value

DbSet<RefreshToken>

RolePermissions

public DbSet<RolePermission> RolePermissions { get; }

Property Value

DbSet<RolePermission>

Roles

public DbSet<Role> Roles { get; }

Property Value

DbSet<Role>

SubModules

public DbSet<SubModule> SubModules { get; }

Property Value

DbSet<SubModule>

TenantBranches

public DbSet<TenantBranch> TenantBranches { get; }

Property Value

DbSet<TenantBranch>

TenantModules

public DbSet<TenantModule> TenantModules { get; }

Property Value

DbSet<TenantModule>

TenantRolePermissions

public DbSet<TenantRolePermission> TenantRolePermissions { get; }

Property Value

DbSet<TenantRolePermission>

TenantRoles

public DbSet<TenantRole> TenantRoles { get; }

Property Value

DbSet<TenantRole>

TenantSubModules

public DbSet<TenantSubModule> TenantSubModules { get; }

Property Value

DbSet<TenantSubModule>

Tenants

public DbSet<Tenant> Tenants { get; }

Property Value

DbSet<Tenant>

UserBranches

public DbSet<UserBranch> UserBranches { get; }

Property Value

DbSet<UserBranch>

UserRoleAssignments

public DbSet<UserRoleAssignment> UserRoleAssignments { get; }

Property Value

DbSet<UserRoleAssignment>

UserSessions

public DbSet<UserSession> UserSessions { get; }

Property Value

DbSet<UserSession>

Users

public DbSet<User> Users { get; }

Property Value

DbSet<User>

Methods

OnModelCreating(ModelBuilder)

Override this method to further configure the model that was discovered by convention from the entity types exposed in Microsoft.EntityFrameworkCore.DbSet<TEntity> properties on your derived context. The resulting model may be cached and re-used for subsequent instances of your derived context.

protected override void OnModelCreating(ModelBuilder modelBuilder)

Parameters

modelBuilder ModelBuilder

The builder being used to construct the model for this context. Databases (and other extensions) typically define extension methods on this object that allow you to configure aspects of the model that are specific to a given database.

Remarks

If a model is explicitly set on the options for this context (via Microsoft.EntityFrameworkCore.DbContextOptionsBuilder.UseModel(Microsoft.EntityFrameworkCore.Metadata.IModel)) then this method will not be run. However, it will still run when creating a compiled model.

See Modeling entity types and relationships for more information and examples.