예제 #1
0
파일: SeedHelper.cs 프로젝트: sachem1/3.6.0
        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();
        }
예제 #2
0
        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();
        }
예제 #3
0
 public DefaultSettingsCreator(DispatcherDbContext context)
 {
     _context = context;
 }
예제 #4
0
 public InitialHostDbBuilder(DispatcherDbContext context)
 {
     _context = context;
 }
예제 #5
0
 public DefaultTenantBuilder(DispatcherDbContext context)
 {
     _context = context;
 }
예제 #6
0
 public HostRoleAndUserCreator(DispatcherDbContext context)
 {
     _context = context;
 }
예제 #7
0
 public DefaultEditionCreator(DispatcherDbContext context)
 {
     _context = context;
 }
예제 #8
0
 public TenantRoleAndUserBuilder(DispatcherDbContext context, int tenantId)
 {
     _context  = context;
     _tenantId = tenantId;
 }
예제 #9
0
 public DefaultLanguagesCreator(DispatcherDbContext context)
 {
     _context = context;
 }