Show / Hide Table of Contents

Class FunctionalityDbContext

Base class for the Entity Framework database context used for functionality.

Inheritance
Object
Microsoft.EntityFrameworkCore.DbContext
FunctionalityDbContext
Inherited Members
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbSetCache.GetOrAddSet(Microsoft.EntityFrameworkCore.Internal.IDbSetSource, System.Type)
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbQueryCache.GetOrAddQuery(Microsoft.EntityFrameworkCore.Internal.IDbQuerySource, System.Type)
Microsoft.EntityFrameworkCore.DbContext.Set<TEntity>()
Microsoft.EntityFrameworkCore.DbContext.Query<TQuery>()
Microsoft.EntityFrameworkCore.DbContext.OnConfiguring(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder)
Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
DbContext.SaveChanges(Boolean)
Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(System.Threading.CancellationToken)
DbContext.SaveChangesAsync(Boolean, CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.SetPool(Microsoft.EntityFrameworkCore.Internal.IDbContextPool)
DbContext.IDbContextPoolable.SnapshotConfiguration()
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.Resurrect(Microsoft.EntityFrameworkCore.Internal.DbContextPoolConfigurationSnapshot)
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.ResetState()
Microsoft.EntityFrameworkCore.DbContext.Dispose()
Microsoft.EntityFrameworkCore.DbContext.Entry<TEntity>(TEntity)
DbContext.Entry(Object)
Microsoft.EntityFrameworkCore.DbContext.Add<TEntity>(TEntity)
Microsoft.EntityFrameworkCore.DbContext.AddAsync<TEntity>(TEntity, System.Threading.CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.Attach<TEntity>(TEntity)
Microsoft.EntityFrameworkCore.DbContext.Update<TEntity>(TEntity)
Microsoft.EntityFrameworkCore.DbContext.Remove<TEntity>(TEntity)
DbContext.Add(Object)
Microsoft.EntityFrameworkCore.DbContext.AddAsync(System.Object, System.Threading.CancellationToken)
DbContext.Attach(Object)
Microsoft.EntityFrameworkCore.DbContext.Update(System.Object)
Microsoft.EntityFrameworkCore.DbContext.Remove(System.Object)
DbContext.AddRange(Object[])
Microsoft.EntityFrameworkCore.DbContext.AddRangeAsync(System.Object[])
Microsoft.EntityFrameworkCore.DbContext.AttachRange(System.Object[])
DbContext.UpdateRange(Object[])
DbContext.RemoveRange(Object[])
Microsoft.EntityFrameworkCore.DbContext.AddRange(System.Collections.Generic.IEnumerable<System.Object>)
DbContext.AddRangeAsync(IEnumerable<Object>, CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.AttachRange(System.Collections.Generic.IEnumerable<System.Object>)
Microsoft.EntityFrameworkCore.DbContext.UpdateRange(System.Collections.Generic.IEnumerable<System.Object>)
Microsoft.EntityFrameworkCore.DbContext.RemoveRange(System.Collections.Generic.IEnumerable<System.Object>)
DbContext.Find(Type, Object[])
DbContext.FindAsync(Type, Object[])
Microsoft.EntityFrameworkCore.DbContext.FindAsync(System.Type, System.Object[], System.Threading.CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.Find<TEntity>(System.Object[])
Microsoft.EntityFrameworkCore.DbContext.FindAsync<TEntity>(System.Object[])
Microsoft.EntityFrameworkCore.DbContext.FindAsync<TEntity>(System.Object[], System.Threading.CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.Database
Microsoft.EntityFrameworkCore.DbContext.ChangeTracker
DbContext.Model
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.SetSource
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.QuerySource
DbContext.IDbContextDependencies.EntityFinderFactory
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.QueryProvider
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.StateManager
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.ChangeDetector
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.EntityGraphAttacher
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.UpdateLogger
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.InfrastructureLogger
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<System.IServiceProvider>.Instance
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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
IDbContextWithSchema.Schema

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.

Overrides
Microsoft.EntityFrameworkCore.DbContext.OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder)

Extension Methods

FunctionalityDbContextExtensions.SeedSecurityModule(FunctionalityDbContext, Guid)
FunctionalityDbContextExtensions.EnsureSeedData(FunctionalityDbContext)
IRM.AspNetCore.Identity.EntityFrameworkCore.FunctionalityDbContextExtensions.EnsureSeedData(IRM.AspNetCore.Identity.EntityFrameworkCore.FunctionalityDbContext, IRM.AspNetCore.Identity.PriceLevel, System.Nullable<System.Guid>, System.Boolean)
IRM.AspNetCore.Identity.EntityFrameworkCore.FunctionalityDbContextExtensions.GetOrAddSecurityModule(IRM.AspNetCore.Identity.EntityFrameworkCore.FunctionalityDbContext, IRM.AspNetCore.Identity.PriceLevel, System.Nullable<System.Guid>, System.Nullable<System.Boolean>, System.Boolean)
Back to top Generated by DocFX