Beispiel #1
0
        public static void Main(string[] args)
        {
            var host = CreateHostBuilder(args).Build();
            using (var scope = host.Services.CreateScope())
            {
                var services = scope.ServiceProvider;
                try
                {
                    var context = services.GetRequiredService<DataContext>();
                    context.Database.Migrate();
                    SeedCategories.Seed(context);
                    Seed.SeedUsers(context);
                }
                catch(Exception ex)
                {
                    var logger = services.GetRequiredService<ILogger<Program>>();
                    logger.LogError(ex, "An error occured during migration");
                }
            }

            host.Run();
        }
Beispiel #2
0
 public Seedling(string filename, string parentCategory, string childCategory)
 {
     FileName   = filename;
     CategoryId = SeedCategories.GetCategoryId(parentCategory, childCategory);
 }
Beispiel #3
0
 public Seedling(string filename, string category)
 {
     FileName   = filename;
     CategoryId = SeedCategories.GetCategoryId(category);
 }
Beispiel #4
0
 public BLUCarnivaleSeedling(string name, string category)
 {
     FileName   = name;
     CategoryId = SeedCategories.GetCategoryId(category);
 }
Beispiel #5
0
 public BLUSpellSeedling(string name, string category)
 {
     FileName   = name;
     CategoryId = SeedCategories.GetCategoryId(category);
 }
 public CraftingLogSeedling(string name, string parentCategory, string childCategory)
 {
     FileName          = name;
     CategoryId        = SeedCategories.GetCategoryId(parentCategory, childCategory);
     CraftingLogTypeId = SeedCommon.GetCraftingLogTypeIndex(name);
 }
Beispiel #7
0
 public AchievementSeedling(string name, string category, string type)
 {
     FileName          = name;
     CategoryId        = SeedCategories.GetCategoryId(category);
     AchievementTypeId = SeedCommon.GetAchievementTypeId(type);
 }