public TenantController(HomeProjectContext context) { _context = context; if (_context.Tenants.Count() == 0) { // TODO: this should accept the logged in user name once Auth is put in. // Create a new Tenant if collection is empty, // which means you can't delete all Tenants. _context.Tenants.Add(new Tenant { Name = "Tenant1" }); _context.SaveChanges(); } }
public ProjectItemsController(HomeProjectContext context) { _context = context; }