BabelDbContext
Namespace: Babel.Data Assembly: Babel.Data.dll
A babel database context.
public class BabelDbContext : IdentityDbContext<User>, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService, IDisposable, IAsyncDisposableInheritance
object ← DbContext ← IdentityUserContext<User, string, IdentityUserClaim<string>, IdentityUserLogin<string>, IdentityUserToken<string>> ← IdentityDbContext<User, IdentityRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityRoleClaim<string>, IdentityUserToken<string>> ← IdentityDbContext<User, IdentityRole, string> ← IdentityDbContext<User> ← BabelDbContext
Implements
IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService, IDisposable, IAsyncDisposable
Inherited Members
IdentityDbContext<User, IdentityRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityRoleClaim<string>, IdentityUserToken<string>>.OnModelCreating(ModelBuilder), IdentityDbContext<User, IdentityRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityRoleClaim<string>, IdentityUserToken<string>>.UserRoles, IdentityDbContext<User, IdentityRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityRoleClaim<string>, IdentityUserToken<string>>.Roles, IdentityDbContext<User, IdentityRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityRoleClaim<string>, IdentityUserToken<string>>.RoleClaims, IdentityUserContext<User, string, IdentityUserClaim<string>, IdentityUserLogin<string>, IdentityUserToken<string>>.OnModelCreating(ModelBuilder), IdentityUserContext<User, string, IdentityUserClaim<string>, IdentityUserLogin<string>, IdentityUserToken<string>>.Users, IdentityUserContext<User, string, IdentityUserClaim<string>, IdentityUserLogin<string>, IdentityUserToken<string>>.UserClaims, IdentityUserContext<User, string, IdentityUserClaim<string>, IdentityUserLogin<string>, IdentityUserToken<string>>.UserLogins, IdentityUserContext<User, string, IdentityUserClaim<string>, IdentityUserLogin<string>, IdentityUserToken<string>>.UserTokens, DbContext.Set<TEntity>(), DbContext.Set<TEntity>(string), DbContext.OnConfiguring(DbContextOptionsBuilder), DbContext.ConfigureConventions(ModelConfigurationBuilder), DbContext.OnModelCreating(ModelBuilder), DbContext.SaveChanges(), DbContext.SaveChanges(bool), DbContext.SaveChangesAsync(CancellationToken), DbContext.SaveChangesAsync(bool, CancellationToken), DbContext.Dispose(), DbContext.DisposeAsync(), DbContext.Entry<TEntity>(TEntity), DbContext.Entry(object), DbContext.Add<TEntity>(TEntity), DbContext.AddAsync<TEntity>(TEntity, CancellationToken), DbContext.Attach<TEntity>(TEntity), DbContext.Update<TEntity>(TEntity), DbContext.Remove<TEntity>(TEntity), DbContext.Add(object), DbContext.AddAsync(object, CancellationToken), DbContext.Attach(object), DbContext.Update(object), DbContext.Remove(object), DbContext.AddRange(params object[]), DbContext.AddRangeAsync(params object[]), DbContext.AttachRange(params object[]), DbContext.UpdateRange(params object[]), DbContext.RemoveRange(params object[]), DbContext.AddRange(IEnumerable<object>), DbContext.AddRangeAsync(IEnumerable<object>, CancellationToken), DbContext.AttachRange(IEnumerable<object>), DbContext.UpdateRange(IEnumerable<object>), DbContext.RemoveRange(IEnumerable<object>), DbContext.Find(Type, params object?[]?), DbContext.FindAsync(Type, params object?[]?), DbContext.FindAsync(Type, object?[]?, CancellationToken), DbContext.Find<TEntity>(params object?[]?), DbContext.FindAsync<TEntity>(params object?[]?), DbContext.FindAsync<TEntity>(object?[]?, CancellationToken), DbContext.FromExpression<TResult>(Expression<Func<IQueryable<TResult>>>), DbContext.Database, DbContext.ChangeTracker, DbContext.Model, DbContext.ContextId, DbContext.SavingChanges, DbContext.SavedChanges, DbContext.SaveChangesFailed, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Extension Methods
BabelDbContextExtensions.Exists<T>(BabelDbContext, T), BabelDbContextExtensions.IsAttached<T>(BabelDbContext, T), BabelDbContextExtensions.IsDetached<T>(BabelDbContext, T), BabelDbContextExtensions.TryAttach<T>(BabelDbContext, DbSet<T>, T)
Constructors
BabelDbContext(DbContextOptions)
Initializes a new instance of the BabelDbContext class.
public BabelDbContext(DbContextOptions options)Parameters
options DbContextOptions
Options for controlling the operation.
Properties
AllowSave
Gets or sets a value indicating whether to allow save changes to database.
public bool AllowSave { get; set; }Property Value
ApiKeys
Gets or sets the API keys.
public DbSet<ApiKey> ApiKeys { get; set; }Property Value
Assemblies
Gets or sets the assemblies.
public DbSet<Assembly> Assemblies { get; set; }Property Value
Contacts
Gets or sets the contacts.
public DbSet<Contact> Contacts { get; set; }Property Value
CustomerResources
Gets or sets the customer resources table.
public DbSet<CustomerResource> CustomerResources { get; set; }Property Value
Customers
Gets or sets the customers.
public DbSet<Customer> Customers { get; set; }Property Value
DownloadHistories
Gets or sets the download histories.
public DbSet<DownloadHistory> DownloadHistories { get; set; }Property Value
Downloads
Gets or sets the downloads.
public DbSet<Download> Downloads { get; set; }Property Value
LicenseTemplates
Gets or sets the license templates table.
public DbSet<LicenseTemplate> LicenseTemplates { get; set; }Property Value
LicenseTokens
Gets or sets the license tokens.
public DbSet<LicenseToken> LicenseTokens { get; set; }Property Value
LicenseTraces
Gets or sets the license traces.
public DbSet<LicenseTrace> LicenseTraces { get; set; }Property Value
Licenses
Gets or sets the licenses.
public DbSet<License> Licenses { get; set; }Property Value
Logs
Gets or sets the logs table.
public DbSet<LogEntry> Logs { get; set; }Property Value
OrderResources
Gets or sets the order resources table.
public DbSet<OrderResource> OrderResources { get; set; }Property Value
Orders
Gets or sets the orders.
public DbSet<Order> Orders { get; set; }Property Value
ProductAssemblies
Gets or sets the product assemblies.
public DbSet<ProductAssembly> ProductAssemblies { get; set; }Property Value
ProductLicenses
Gets or sets the product licenses.
public DbSet<ProductLicense> ProductLicenses { get; set; }Property Value
ProductOrders
Gets or sets the product orders.
public DbSet<ProductOrder> ProductOrders { get; set; }Property Value
ProductResources
Gets or sets the product resources table.
public DbSet<ProductResource> ProductResources { get; set; }Property Value
Products
Gets or sets the products.
public DbSet<Product> Products { get; set; }Property Value
ReleaseResources
Gets or sets the release resources table.
public DbSet<ReleaseResource> ReleaseResources { get; set; }Property Value
Releases
Gets or sets the releases.
public DbSet<Release> Releases { get; set; }Property Value
ReportProperties
Gets or sets the report properties table.
public DbSet<ReportProperty> ReportProperties { get; set; }Property Value
Reports
Gets or sets the reports table.
public DbSet<Report> Reports { get; set; }Property Value
Resources
Gets or sets the resources table.
public DbSet<Resource> Resources { get; set; }Property Value
Scripts
Gets or sets the scripts table.
public DbSet<Script> Scripts { get; set; }Property Value
Settings
Gets or sets the settings table.
public DbSet<Setting> Settings { get; set; }Property Value
Unit
Gets or sets the unit.
public UnitOfWork Unit { get; set; }Property Value
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.
In situations where an instance of may or may not have been passed to the constructor, you can use to determine if the options have already been set, and skip some or all of the logic in .
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)Parameters
optionsBuilder DbContextOptionsBuilder
A builder used to create or modify options for this context. Databases (and other extensions)
OnModelCreating(ModelBuilder)
Configures the schema needed for the identity framework.
protected override void OnModelCreating(ModelBuilder modelBuilder)Parameters
modelBuilder ModelBuilder
The builder being used to construct the model for this context.
SaveChanges()
Saves all changes made in this context to the database.
public override int SaveChanges()Returns
The number of state entries written to the database.
Remarks
This method will automatically call to discover any changes to entity instances before saving to the underlying database. This can be disabled via .
Last updated