示例#1
0
        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();
        }
示例#2
0
 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;
 }
示例#5
0
 public InitialHostDbBuilder(gimcDbContext context)
 {
     _context = context;
 }
 public DefaultLanguagesCreator(gimcDbContext context)
 {
     _context = context;
 }
 public DefaultSettingsCreator(gimcDbContext context)
 {
     _context = context;
 }
示例#8
0
 public DefaultTenantBuilder(gimcDbContext context)
 {
     _context = context;
 }
示例#9
0
 public TenantRoleAndUserBuilder(gimcDbContext context, int tenantId)
 {
     _context  = context;
     _tenantId = tenantId;
 }