Beispiel #1
0
 protected override void Seed(AMStockServerDBContext context)
 {
     if (Singleton.SeedDefaults)
     {
         var client = context.Set <SettingDTO>().Find(1);// context.Set<ClientDTO>().Find(1);
         if (client == null)
         {
             context = (AMStockServerDBContext)DbContextUtil.Seed(context);
         }
     }
     base.Seed(context);
 }
Beispiel #2
0
 protected override void Seed(AMStockDBContext context)
 {
     if (Singleton.SeedDefaults)
     {
         var setting = context.Set <SettingDTO>().Find(1);
         if (setting == null)
         {
             context = (AMStockDBContext)DbContextUtil.Seed(context);
         }
     }
     base.Seed(context);
 }
Beispiel #3
0
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            DbContextUtil.OnModelCreating(modelBuilder);
        }