示例#1
0
 public static void Seed(MacheteContext db, string tenantTimeZone)
 {
     if (!db.Lookups.Any())
     {
         MacheteLookups.Initialize(db);
     }
     if (!db.TransportProviders.Any() || !db.TransportProviderAvailabilities.Any())
     {
         MacheteTransports.Initialize(db);
     }
     MacheteConfigs.Synchronize(db, tenantTimeZone);
     if (!db.TransportRules.Any())
     {
         MacheteRules.Initialize(db);
     }
     if (db.ReportDefinitions.Count() == 0) // Reports are manged in UI now
     {
         MacheteReportDefinitions.Initialize(db);
     }
 }
示例#2
0
 public static void Seed(MacheteContext db)
 {
     if (!db.Lookups.Any())
     {
         MacheteLookups.Initialize(db);
     }
     if (!db.TransportProviders.Any() || !db.TransportProviderAvailabilities.Any())
     {
         MacheteTransports.Initialize(db);
     }
     if (!db.Configs.Any())
     {
         MacheteConfigs.Initialize(db);
     }
     if (!db.TransportRules.Any())
     {
         MacheteRules.Initialize(db);
     }
     if (db.ReportDefinitions.Count() != MacheteReportDefinitions._cache.Count)
     {
         MacheteReportDefinitions.Initialize(db);
     }
 }