Skip to content

ApplicationDbContext

Namespace: Database.EntityFramework

public class ApplicationDbContext : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext`1[[Database.EntityFramework.Models.ApiUser, Database, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure`1[[System.IServiceProvider, System.ComponentModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies, Microsoft.EntityFrameworkCore.Internal.IDbSetCache, Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable, Microsoft.EntityFrameworkCore.Infrastructure.IResettableService, System.IDisposable, System.IAsyncDisposable

Inheritance Object → DbContext → IdentityUserContext<ApiUser, String, IdentityUserClaim<String>, IdentityUserLogin<String>, IdentityUserToken<String>> → IdentityDbContext<ApiUser, IdentityRole, String, IdentityUserClaim<String>, IdentityUserRole<String>, IdentityUserLogin<String>, IdentityRoleClaim<String>, IdentityUserToken<String>> → IdentityDbContext<ApiUser, IdentityRole, String> → IdentityDbContext<ApiUser> → ApplicationDbContext

Implements IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService, IDisposable, IAsyncDisposable

Properties

ChangeTracker

public ChangeTracker ChangeTracker { get; }

Property Value

ChangeTracker

ContextId

public DbContextId ContextId { get; }

Property Value

DbContextId

CoordinateMappings

Represents the collection of CoordinateMappings entities in the database.

public DbSet<CoordinateMapping> CoordinateMappings { get; set; }

Property Value

DbSet<CoordinateMapping>

Database

public DatabaseFacade Database { get; }

Property Value

DatabaseFacade

Model

public IModel Model { get; }

Property Value

IModel

RoleClaims

public DbSet<IdentityRoleClaim<String>> RoleClaims { get; set; }

Property Value

DbSet<IdentityRoleClaim<String>>

Roles

public DbSet<IdentityRole> Roles { get; set; }

Property Value

DbSet<IdentityRole>

TokenInfos

Represents the collection of TokenInfo entities in the database.

public DbSet<TokenInfo> TokenInfos { get; set; }

Property Value

DbSet<TokenInfo>

TopicSettings

Represents the collection of TopicSetting entities in the database.

public DbSet<TopicSetting> TopicSettings { get; set; }

Property Value

DbSet<TopicSetting>

UserClaims

public DbSet<IdentityUserClaim<String>> UserClaims { get; set; }

Property Value

DbSet<IdentityUserClaim<String>>

UserLogins

public DbSet<IdentityUserLogin<String>> UserLogins { get; set; }

Property Value

DbSet<IdentityUserLogin<String>>

UserRoles

public DbSet<IdentityUserRole<String>> UserRoles { get; set; }

Property Value

DbSet<IdentityUserRole<String>>

Users

public DbSet<ApiUser> Users { get; set; }

Property Value

DbSet<ApiUser>

UserTokens

public DbSet<IdentityUserToken<String>> UserTokens { get; set; }

Property Value

DbSet<IdentityUserToken<String>>

Constructors

ApplicationDbContext(DbContextOptions<ApplicationDbContext>)

public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)

Parameters

options DbContextOptions<ApplicationDbContext>

Methods

ApplyMigration<TDbContext>(IServiceScope)

Applies any pending migrations for the specified DbContext.

public static void ApplyMigration<TDbContext>(IServiceScope scope)

Type Parameters

TDbContext

Parameters

scope IServiceScope

OnModelCreating(ModelBuilder)

protected void OnModelCreating(ModelBuilder modelBuilder)

Parameters

modelBuilder ModelBuilder

Events

SaveChangesFailed

public event EventHandler<SaveChangesFailedEventArgs> SaveChangesFailed;

SavedChanges

public event EventHandler<SavedChangesEventArgs> SavedChanges;

SavingChanges

public event EventHandler<SavingChangesEventArgs> SavingChanges;