public TenantTasks(Tenant tenant, PlsDbContext db, IOptions <AlcuinOptions> opt, IIisService iis, ConfigDatabaseServiceFactory cfgDbFactory) { _opt = opt; _iis = iis; Dto = tenant ?? throw new ArgumentNullException(nameof(tenant)); _server = db.Servers.Find(tenant.ServerId); _cfgDb = cfgDbFactory(_server.ConnectionString(), tenant.ConfigDb); }
public static void Upsert <T, TKey>(this PlsDbContext db, T newItem, Expression <Func <T, TKey> > on) where T : class { if (newItem == null) { throw new ArgumentNullException(nameof(newItem)); } if (@on == null) { throw new ArgumentNullException(nameof(@on)); } var id = on.Compile()(newItem); T item; if ((item = db.Find <T>(id)) != null) { item.InjectFrom(newItem); } else { db.Add(newItem); } }
public AddTenantCommandBuilder(PlsDbContext db) { _db = db; }
public BackupTenantCommandBuilder(PlsDbContext db) { _db = db; }
public ServerListCommandBuilder( PlsDbContext db) { _db = db; }
public DropTenantCommandBuilder(PlsDbContext db, TenantTasksFactory t) { _db = db; _t = t; }
public RestoreDbCommandBuilder(PlsDbContext db) { _db = db; }
public AddServerCommandBuilder(PlsDbContext db) { _db = db; }
public MigrateTenantCommandBuilder(PlsDbContext db, IOptions <AlcuinOptions> options) { _db = db; _options = options.Value; }
public CopyTenantCommandBuilder(PlsDbContext db, TenantTasksFactory tn) { _db = db; _tn = tn; }
public CopyDbCommandBuilder(PlsDbContext db) { _db = db; }
public TenantListCommandBuilder(PlsDbContext db, TenantTasksFactory tt) { _db = db; _tt = tt; }
public CreateWebAppCommandBuilder(PlsDbContext db, TenantTasksFactory t) { _db = db; _t = t; }
public DbListServerCommandBuilder(PlsDbContext db) { _db = db; }