| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- using System.Data.Common;
- using System.Data.Entity;
- using System.Data.Entity.Core.Objects;
- using System.Data.Entity.Infrastructure;
- using Abp.MultiTenancy;
- using IwbZero.Authorization.Base.Users;
- using IwbZero.Authorization.Roles;
- using IwbZero.Authorization.Users;
- using IwbZero.MultiTenancy;
- namespace IwbZero.EntityFramework
- {
- [MultiTenancySide(MultiTenancySides.Host)]
- public abstract class IwbZeroHostDbContext<TTenant, TRole, TUser> : IwbZeroCommonDbContext<TRole, TUser>
- where TTenant : IwbTenant<TUser>
- where TRole : IwbSysRole<TUser>
- where TUser : IwbSysUser<TUser>
- {
- /// <summary>
- /// Tenants
- /// </summary>
- public virtual IDbSet<TTenant> Tenants { get; set; }
- ///// <summary>
- ///// Editions.
- ///// </summary>
- //public virtual IDbSet<Edition> Editions { get; set; }
- ///// <summary>
- ///// FeatureSettings.
- ///// </summary>
- //public virtual IDbSet<FeatureSetting> FeatureSettings { get; set; }
- ///// <summary>
- ///// TenantFeatureSetting.
- ///// </summary>
- //public virtual IDbSet<TenantFeatureSetting> TenantFeatureSettings { get; set; }
- ///// <summary>
- ///// EditionFeatureSettings.
- ///// </summary>
- //public virtual IDbSet<EditionFeatureSetting> EditionFeatureSettings { get; set; }
- ///// <summary>
- ///// Background jobs.
- ///// </summary>
- //public virtual IDbSet<BackgroundJobInfo> BackgroundJobs { get; set; }
- /// <summary>
- /// User accounts
- /// </summary>
- public virtual IDbSet<UserAccount> UserAccounts { get; set; }
- protected IwbZeroHostDbContext()
- {
- }
- protected IwbZeroHostDbContext(string nameOrConnectionString)
- : base(nameOrConnectionString)
- {
- }
- protected IwbZeroHostDbContext(DbCompiledModel model)
- : base(model)
- {
- }
- protected IwbZeroHostDbContext(DbConnection existingConnection, bool contextOwnsConnection)
- : base(existingConnection, contextOwnsConnection)
- {
- }
- protected IwbZeroHostDbContext(string nameOrConnectionString, DbCompiledModel model)
- : base(nameOrConnectionString, model)
- {
- }
- protected IwbZeroHostDbContext(ObjectContext objectContext, bool dbContextOwnsObjectContext)
- : base(objectContext, dbContextOwnsObjectContext)
- {
- }
- protected IwbZeroHostDbContext(DbConnection existingConnection, DbCompiledModel model, bool contextOwnsConnection)
- : base(existingConnection, model, contextOwnsConnection)
- {
- }
- }
- }
|