Class FunctionalityDbContext
Base class for the Entity Framework database context used for functionality.
Inherited Members
Namespace: IRM.AspNetCore.Identity.EntityFrameworkCore
Assembly: IRM.AspNetCore.Identity.EntityFrameworkCore.dll
Syntax
public class FunctionalityDbContext : DbContext, IDisposable, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbQueryCache, IDbContextPoolable, IDbContextWithSchema
Constructors
FunctionalityDbContext()
Initializes a new instance of the FunctionalityDbContext class.
Declaration
protected FunctionalityDbContext()
FunctionalityDbContext(DbContextOptions)
Initializes a new instance of the FunctionalityDbContext class.
Declaration
protected FunctionalityDbContext(DbContextOptions options)
Parameters
Microsoft.EntityFrameworkCore.DbContextOptions
options
The options to be used by a Microsoft.EntityFrameworkCore.DbContext. |
FunctionalityDbContext(DbContextOptions<FunctionalityDbContext>)
Initializes a new instance of the FunctionalityDbContext class.
Declaration
public FunctionalityDbContext(DbContextOptions<FunctionalityDbContext> options)
Parameters
Microsoft.EntityFrameworkCore.DbContextOptions<FunctionalityDbContext>
options
The options to be used by a Microsoft.EntityFrameworkCore.DbContext. |
Properties
BoughtModules
Gets or sets the DbSet<TEntity> of BoughtModules.
Declaration
public DbSet<BoughtModule> BoughtModules { get; set; }
Property Value
DbSet<BoughtModule>
|
Modules
Gets or sets the DbSet<TEntity> of Modules.
Declaration
public DbSet<Module> Modules { get; set; }
Property Value
DbSet<Module>
|
RoleTemplates
Gets or sets the DbSet<TEntity> of RoleTemplates.
Declaration
public DbSet<RoleTemplate> RoleTemplates { get; set; }
Property Value
DbSet<RoleTemplate>
|
Schema
Gets or sets the schema used for the tables. Defaults to "security".
Declaration
public string Schema { get; set; }
Property Value
String
|
Implements
Methods
BuildBoughtModule(ModelBuilder, Boolean)
Configures the schema needed for BoughtModules.
Declaration
protected virtual void BuildBoughtModule(ModelBuilder builder, bool createDefaultIndexes = true)
Parameters
Microsoft.EntityFrameworkCore.ModelBuilder
builder
The builder being used to construct the model for this context. |
Boolean
createDefaultIndexes
Flag to control if indexes should be created or not. |
BuildFunctionality(ModelBuilder)
Configures the schema needed for Functionality.
Declaration
protected virtual void BuildFunctionality(ModelBuilder builder)
Parameters
Microsoft.EntityFrameworkCore.ModelBuilder
builder
The builder being used to construct the model for this context. |
BuildModule(ModelBuilder)
Configures the schema needed for Module.
Declaration
protected virtual void BuildModule(ModelBuilder builder)
Parameters
Microsoft.EntityFrameworkCore.ModelBuilder
builder
The builder being used to construct the model for this context. |
BuildRoleClaimTemplate(ModelBuilder, Boolean)
Configures the schema needed for RoleClaimTemplate.
Declaration
protected virtual void BuildRoleClaimTemplate(ModelBuilder builder, bool createDefaultIndexes = true)
Parameters
Microsoft.EntityFrameworkCore.ModelBuilder
builder
The builder being used to construct the model for this context. |
Boolean
createDefaultIndexes
Flag to control if indexes should be created or not. |
BuildRoleTemplate(ModelBuilder, Boolean)
Configures the schema needed for RoleTemplate.
Declaration
protected virtual void BuildRoleTemplate(ModelBuilder builder, bool createDefaultIndexes = true)
Parameters
Microsoft.EntityFrameworkCore.ModelBuilder
builder
The builder being used to construct the model for this context. |
Boolean
createDefaultIndexes
Flag to control if indexes should be created or not. |
BuildTenantPermission(ModelBuilder)
Configures the schema needed for TenantPermission.
Declaration
protected virtual void BuildTenantPermission(ModelBuilder builder)
Parameters
Microsoft.EntityFrameworkCore.ModelBuilder
builder
The builder being used to construct the model for this context. |
OnModelCreating(ModelBuilder)
Configures the schema needed for the functionality framework.
Declaration
protected override void OnModelCreating(ModelBuilder builder)
Parameters
Microsoft.EntityFrameworkCore.ModelBuilder
builder
The builder being used to construct the model for this context. |