public static void SeedHostDb(gimcDbContext context) { context.SuppressAutoSetTenantId = true; // Host seed new InitialHostDbBuilder(context).Create(); // Default tenant seed (in host database). new DefaultTenantBuilder(context).Create(); new TenantRoleAndUserBuilder(context, 1).Create(); }
public void Build(gimcDbContext context) { //Add some Products context.Products.AddRange( new Product { Title = "Isaac Asimov" }, new Product { Title = "Thomas More" } ); context.SaveChanges(); }
public HostRoleAndUserCreator(gimcDbContext context) { _context = context; }
public DefaultEditionCreator(gimcDbContext context) { _context = context; }
public InitialHostDbBuilder(gimcDbContext context) { _context = context; }
public DefaultLanguagesCreator(gimcDbContext context) { _context = context; }
public DefaultSettingsCreator(gimcDbContext context) { _context = context; }
public DefaultTenantBuilder(gimcDbContext context) { _context = context; }
public TenantRoleAndUserBuilder(gimcDbContext context, int tenantId) { _context = context; _tenantId = tenantId; }