Class InstallationContext
- Namespace
- Oqtane.Repository
- Assembly
- Oqtane.Server.dll
public class InstallationContext : DbContext
- Inheritance
-
objectDbContextInstallationContext
Constructors
InstallationContext(IDatabase, string)
public InstallationContext(IDatabase database, string connectionString)
Parameters
database
IDatabaseconnectionString
string
Properties
Alias
public virtual DbSet<Alias> Alias { get; set; }
Property Value
- DbSet<Alias>
Job
public virtual DbSet<Job> Job { get; set; }
Property Value
- DbSet<Job>
JobLog
public virtual DbSet<JobLog> JobLog { get; set; }
Property Value
- DbSet<JobLog>
ModuleDefinition
public virtual DbSet<ModuleDefinition> ModuleDefinition { get; set; }
Property Value
- DbSet<ModuleDefinition>
Tenant
public virtual DbSet<Tenant> Tenant { get; set; }
Property Value
- DbSet<Tenant>
Methods
OnConfiguring(DbContextOptionsBuilder)
Override this method to configure the database (and other options) to be used for this context. This method is called for each instance of the context that is created. The base implementation does nothing.
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
Parameters
optionsBuilder
DbContextOptionsBuilderA builder used to create or modify options for this context. Databases (and other extensions) typically define extension methods on this object that allow you to configure the context.
Remarks
In situations where an instance of Microsoft.EntityFrameworkCore.DbContextOptions may or may not have been passed to the constructor, you can use Microsoft.EntityFrameworkCore.DbContextOptionsBuilder.IsConfigured to determine if the options have already been set, and skip some or all of the logic in Microsoft.EntityFrameworkCore.DbContext.OnConfiguring(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder).
See DbContext lifetime, configuration, and initialization for more information and examples.