public static void SeedHostDb(DispatcherDbContext 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(); }
private static async Task Main() { var mapper = new Mapper(); var dbContext = new DispatcherDbContext(); var unitOfWork = new Data.EF.UnitOfWork(dbContext, mapper); var resilientTransaction = new ResilientTransaction <DispatcherDbContext>(() => dbContext); var orderService = new OrderService(resilientTransaction, unitOfWork); await dbContext.Database.EnsureCreatedAsync(); await orderService.RunAsync(); }
public DefaultSettingsCreator(DispatcherDbContext context) { _context = context; }
public InitialHostDbBuilder(DispatcherDbContext context) { _context = context; }
public DefaultTenantBuilder(DispatcherDbContext context) { _context = context; }
public HostRoleAndUserCreator(DispatcherDbContext context) { _context = context; }
public DefaultEditionCreator(DispatcherDbContext context) { _context = context; }
public TenantRoleAndUserBuilder(DispatcherDbContext context, int tenantId) { _context = context; _tenantId = tenantId; }
public DefaultLanguagesCreator(DispatcherDbContext context) { _context = context; }