using System.Data.Common; using System.Data.Entity.Core.Objects; using System.Data.Entity.Infrastructure; using Abp.MultiTenancy; using IwbZero.Authorization.Roles; using IwbZero.Authorization.Users; namespace IwbZero.EntityFramework { [MultiTenancySide(MultiTenancySides.Tenant)] public abstract class IwbZeroTenantDbContext : IwbZeroCommonDbContext where TRole : IwbSysRole where TUser : IwbSysUser { /// /// Default constructor. /// Do not directly instantiate this class. Instead, use dependency injection! /// protected IwbZeroTenantDbContext() { } /// /// Constructor with connection string parameter. /// /// Connection string or a name in connection strings in configuration file protected IwbZeroTenantDbContext(string nameOrConnectionString) : base(nameOrConnectionString) { } protected IwbZeroTenantDbContext(DbCompiledModel model) : base(model) { } /// /// This constructor can be used for unit tests. /// protected IwbZeroTenantDbContext(DbConnection existingConnection, bool contextOwnsConnection) : base(existingConnection, contextOwnsConnection) { } protected IwbZeroTenantDbContext(string nameOrConnectionString, DbCompiledModel model) : base(nameOrConnectionString, model) { } protected IwbZeroTenantDbContext(ObjectContext objectContext, bool dbContextOwnsObjectContext) : base(objectContext, dbContextOwnsObjectContext) { } protected IwbZeroTenantDbContext(DbConnection existingConnection, DbCompiledModel model, bool contextOwnsConnection) : base(existingConnection, model, contextOwnsConnection) { } } }