public ActionResult Create(string instName) { //Save institution details in RiskAppDb and set the id. This is not possible now as there is dependency to old dlls. // string instName = "test"; Institution institution = new Entities.Institution() { InstitutionName = instName, DateCreated = DateTime.Now, IsActive=true }; string scriptPath = HttpContext.Server.MapPath(@"~/App_Data/HRATenantDBCreation.sql"); institution = _applicationContext.ServiceContext.AdminService.AddUpdateTenant(institution); _applicationContext.ServiceContext.AdminService.CreateTenantDb(institution, scriptPath); // Task taskA = Task.Run(() => _applicationContext.ServiceContext.AdminService.CreateTenantDb(institution,scriptPath)); return RedirectToAction("ManageInstitution"); }
public ActionResult Create(string instName) { //Save institution details in RiskAppDb and set the id. This is not possible now as there is dependency to old dlls. // string instName = "test"; Institution institution = new Entities.Institution() { InstitutionName = instName, DateCreated = DateTime.Now, IsActive = true }; string scriptPath = HttpContext.Server.MapPath(@"~/App_Data/HRATenantDBCreation.sql"); institution = _applicationContext.ServiceContext.AdminService.AddUpdateTenant(institution); _applicationContext.ServiceContext.AdminService.CreateTenantDb(institution, scriptPath); // Task taskA = Task.Run(() => _applicationContext.ServiceContext.AdminService.CreateTenantDb(institution,scriptPath)); return(RedirectToAction("ManageInstitution")); }
public Entities.Institution AddUpdateTenant(Entities.Institution tenant) { tenant.DbName = Helpers.GenerateDbName(tenant.InstitutionName); return(_repositoryFactory.TenantRepository.AddUpdateTenant(tenant)); }
public int UpdateTenant(Entities.Institution tenant) { return(dbContext.TenantMaster.Update(tenant)); }
public Institution AddUpdateTenant(Entities.Institution tenant) { return((Institution)dbContext.TenantMaster.Insert(tenant)); }