Table of Contents

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

DbSet<AppGroupSqlModel>

AppIdentifierMappings

Gets or sets the DbSet<TEntity> for managing AppIdentifierMappings.

public DbSet<AppIdentifierMappingSqlModel> AppIdentifierMappings { get; set; }

Property Value

DbSet<AppIdentifierMappingSqlModel>

AppTagMappings

Gets or sets the DbSet<TEntity> for managing AppTagMappings.

public DbSet<AppTagMappingSqlModel> AppTagMappings { get; set; }

Property Value

DbSet<AppTagMappingSqlModel>

Apps

Gets or sets the DbSet<TEntity> for managing Apps.

public DbSet<AppSqlModel> Apps { get; set; }

Property Value

DbSet<AppSqlModel>

Configurations

Gets or sets the DbSet<TEntity> for managing Configurations.

public DbSet<ConfigurationSqlModel> Configurations { get; set; }

Property Value

DbSet<ConfigurationSqlModel>

Identifiers

Gets or sets the DbSet<TEntity> for managing Identifiers.

public DbSet<IdentifierSqlModel> Identifiers { get; set; }

Property Value

DbSet<IdentifierSqlModel>

Instances

Gets or sets the DbSet<TEntity> for managing Instances.

public DbSet<InstanceSqlModel> Instances { get; set; }

Property Value

DbSet<InstanceSqlModel>

Licenses

Gets or sets the DbSet<TEntity> for managing Licenses.

public DbSet<LicenseSqlModel> Licenses { get; set; }

Property Value

DbSet<LicenseSqlModel>

Locks

Gets or sets the DbSet<TEntity> for managing Locks.

public DbSet<LockSqlModel> Locks { get; set; }

Property Value

DbSet<LockSqlModel>

Notifications

Gets or sets the DbSet<TEntity> for managing Notifications.

public DbSet<NotificationSqlModel> Notifications { get; set; }

Property Value

DbSet<NotificationSqlModel>

SettingClasses

Gets or sets the DbSet<TEntity> for managing SettingClasses.

public DbSet<SettingClassSqlModel> SettingClasses { get; set; }

Property Value

DbSet<SettingClassSqlModel>

SettingHistories

Gets or sets the DbSet<TEntity> for managing SettingHistories.

public DbSet<SettingHistorySqlModel> SettingHistories { get; set; }

Property Value

DbSet<SettingHistorySqlModel>

Settings

Gets or sets the DbSet<TEntity> for managing Settings.

public DbSet<SettingSqlModel> Settings { get; set; }

Property Value

DbSet<SettingSqlModel>

Tags

Gets or sets the DbSet<TEntity> for managing Tags.

public DbSet<TagSqlModel> Tags { get; set; }

Property Value

DbSet<TagSqlModel>

UserClaimMappings

Gets or sets the DbSet<TEntity> for managing UserClaimMappings.

public DbSet<UserClaimMappingSqlModel> UserClaimMappings { get; set; }

Property Value

DbSet<UserClaimMappingSqlModel>

UserClaims

Gets or sets the DbSet<TEntity> for managing UserClaims.

public DbSet<UserClaimSqlModel> UserClaims { get; set; }

Property Value

DbSet<UserClaimSqlModel>

UserGroupClaimMappings

Gets or sets the DbSet<TEntity> for managing UserGroupClaimMappings.

public DbSet<UserGroupClaimMappingModel> UserGroupClaimMappings { get; set; }

Property Value

DbSet<UserGroupClaimMappingModel>

UserGroupMappings

Gets or sets the DbSet<TEntity> for managing UserGroupMappings.

public DbSet<UserGroupMappingSqlModel> UserGroupMappings { get; set; }

Property Value

DbSet<UserGroupMappingSqlModel>

UserGroupNotificationMappings

Gets or sets the DbSet<TEntity> for managing UserGroupNotificationMappings.

public DbSet<UserGroupNotificationMappingSqlModel> UserGroupNotificationMappings { get; set; }

Property Value

DbSet<UserGroupNotificationMappingSqlModel>

UserGroups

Gets or sets the DbSet<TEntity> for managing UserGroups.

public DbSet<UserGroupSqlModel> UserGroups { get; set; }

Property Value

DbSet<UserGroupSqlModel>

UserNotificationMappings

Gets or sets the DbSet<TEntity> for managing UserNotificationMappings.

public DbSet<UserNotificationMappingSqlModel> UserNotificationMappings { get; set; }

Property Value

DbSet<UserNotificationMappingSqlModel>

UserRoleClaimMappings

Gets or sets the DbSet<TEntity> for managing UserRoleClaimMappings.

public DbSet<UserRoleClaimMappingModel> UserRoleClaimMappings { get; set; }

Property Value

DbSet<UserRoleClaimMappingModel>

UserRoleGroupMappings

Gets or sets the DbSet<TEntity> for managing UserRoleGroupMappings.

public DbSet<UserRoleGroupMappingModel> UserRoleGroupMappings { get; set; }

Property Value

DbSet<UserRoleGroupMappingModel>

UserRoleMappings

Gets or sets the DbSet<TEntity> for managing UserRoleMappings.

public DbSet<UserRoleMappingSqlModel> UserRoleMappings { get; set; }

Property Value

DbSet<UserRoleMappingSqlModel>

UserRoles

Gets or sets the DbSet<TEntity> for managing UserRoles.

public DbSet<UserRoleSqlModel> UserRoles { get; set; }

Property Value

DbSet<UserRoleSqlModel>

Users

Gets or sets the DbSet<TEntity> for managing Users.

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

Property Value

DbSet<UserSqlModel>

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

OpenSettingsDbContext

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 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 UseModel(IModel)) then this method will not be run.