Пример #1
0
 protected override void Seed(PinnaRentDBContext context)
 {
     if (Singleton.SeedDefaults)
     {
         var setting = context.Set <SettingDTO>().Find(1);
         if (setting == null)
         {
             context = (PinnaRentDBContext)DbContextUtil.Seed(context);
         }
     }
     base.Seed(context);
 }
Пример #2
0
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            DbContextUtil.OnModelCreating(modelBuilder);
        }