Class OpenSettingsDbContext
- Namespace
- OpenSettings.Domains.Sql.DataContext
- Assembly
- OpenSettings.dll
Represents the database context for OpenSettings, managing the entity sets for various models such as applications, configurations, users, roles, settings, and more. This class is responsible for interacting with the database and performing CRUD operations on the models.
public class OpenSettingsDbContext : DbContext, IDisposable, IAsyncDisposable, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService
- Inheritance
-
OpenSettingsDbContext
- Implements
- Inherited Members
Constructors
OpenSettingsDbContext(DbContextOptions<OpenSettingsDbContext>)
Initializes a new instance of the OpenSettingsDbContext class.
public OpenSettingsDbContext(DbContextOptions<OpenSettingsDbContext> opts)
Parameters
opts
DbContextOptions<OpenSettingsDbContext>The options to configure the context, typically passed from dependency injection.
Properties
AppGroups
Gets or sets the DbSet<TEntity> for managing AppGroups.
public DbSet<AppGroupSqlModel> AppGroups { get; set; }
Property Value
AppIdentifierMappings
Gets or sets the DbSet<TEntity> for managing AppIdentifierMappings.
public DbSet<AppIdentifierMappingSqlModel> AppIdentifierMappings { get; set; }
Property Value
AppTagMappings
Gets or sets the DbSet<TEntity> for managing AppTagMappings.
public DbSet<AppTagMappingSqlModel> AppTagMappings { get; set; }
Property Value
Apps
Gets or sets the DbSet<TEntity> for managing Apps.
public DbSet<AppSqlModel> Apps { get; set; }
Property Value
Configurations
Gets or sets the DbSet<TEntity> for managing Configurations.
public DbSet<ConfigurationSqlModel> Configurations { get; set; }
Property Value
Identifiers
Gets or sets the DbSet<TEntity> for managing Identifiers.
public DbSet<IdentifierSqlModel> Identifiers { get; set; }
Property Value
Instances
Gets or sets the DbSet<TEntity> for managing Instances.
public DbSet<InstanceSqlModel> Instances { get; set; }
Property Value
Licenses
Gets or sets the DbSet<TEntity> for managing Licenses.
public DbSet<LicenseSqlModel> Licenses { get; set; }
Property Value
Locks
Gets or sets the DbSet<TEntity> for managing Locks.
public DbSet<LockSqlModel> Locks { get; set; }
Property Value
Notifications
Gets or sets the DbSet<TEntity> for managing Notifications.
public DbSet<NotificationSqlModel> Notifications { get; set; }
Property Value
SettingClasses
Gets or sets the DbSet<TEntity> for managing SettingClasses.
public DbSet<SettingClassSqlModel> SettingClasses { get; set; }
Property Value
SettingHistories
Gets or sets the DbSet<TEntity> for managing SettingHistories.
public DbSet<SettingHistorySqlModel> SettingHistories { get; set; }
Property Value
Settings
Gets or sets the DbSet<TEntity> for managing Settings.
public DbSet<SettingSqlModel> Settings { get; set; }
Property Value
Tags
Gets or sets the DbSet<TEntity> for managing Tags.
public DbSet<TagSqlModel> Tags { get; set; }
Property Value
UserClaimMappings
Gets or sets the DbSet<TEntity> for managing UserClaimMappings.
public DbSet<UserClaimMappingSqlModel> UserClaimMappings { get; set; }
Property Value
UserClaims
Gets or sets the DbSet<TEntity> for managing UserClaims.
public DbSet<UserClaimSqlModel> UserClaims { get; set; }
Property Value
UserGroupClaimMappings
Gets or sets the DbSet<TEntity> for managing UserGroupClaimMappings.
public DbSet<UserGroupClaimMappingModel> UserGroupClaimMappings { get; set; }
Property Value
UserGroupMappings
Gets or sets the DbSet<TEntity> for managing UserGroupMappings.
public DbSet<UserGroupMappingSqlModel> UserGroupMappings { get; set; }
Property Value
UserGroupNotificationMappings
Gets or sets the DbSet<TEntity> for managing UserGroupNotificationMappings.
public DbSet<UserGroupNotificationMappingSqlModel> UserGroupNotificationMappings { get; set; }
Property Value
UserGroups
Gets or sets the DbSet<TEntity> for managing UserGroups.
public DbSet<UserGroupSqlModel> UserGroups { get; set; }
Property Value
UserNotificationMappings
Gets or sets the DbSet<TEntity> for managing UserNotificationMappings.
public DbSet<UserNotificationMappingSqlModel> UserNotificationMappings { get; set; }
Property Value
UserRoleClaimMappings
Gets or sets the DbSet<TEntity> for managing UserRoleClaimMappings.
public DbSet<UserRoleClaimMappingModel> UserRoleClaimMappings { get; set; }
Property Value
UserRoleGroupMappings
Gets or sets the DbSet<TEntity> for managing UserRoleGroupMappings.
public DbSet<UserRoleGroupMappingModel> UserRoleGroupMappings { get; set; }
Property Value
UserRoleMappings
Gets or sets the DbSet<TEntity> for managing UserRoleMappings.
public DbSet<UserRoleMappingSqlModel> UserRoleMappings { get; set; }
Property Value
UserRoles
Gets or sets the DbSet<TEntity> for managing UserRoles.
public DbSet<UserRoleSqlModel> UserRoles { get; set; }
Property Value
Users
Gets or sets the DbSet<TEntity> for managing Users.
public DbSet<UserSqlModel> Users { get; set; }
Property Value
Methods
Detach(object)
public virtual void Detach(object entity)
Parameters
entity
object
DetachRange(params object[])
public virtual void DetachRange(params object[] entities)
Parameters
entities
object[]
GetInstance(ProviderConfiguration)
public static OpenSettingsDbContext GetInstance(ProviderConfiguration provider)
Parameters
provider
ProviderConfiguration
Returns
OnModelCreating(ModelBuilder)
Override this method to further configure the model that was discovered by convention from the entity types exposed in 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
ModelBuilderThe 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 UseModel(IModel)) then this method will not be run.