예제 #1
0
        public static async Task Main(string[] args)
        {
            var host = CreateHostBuilder(args).Build();

            using (var scope = host.Services.CreateScope())
            {
                var services = scope.ServiceProvider;

                try
                {
                    var context = services.GetRequiredService <ApplicationDbContext>();
                    await ApplicationDbContextSeed.SeedCSVDataAsync(context);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }

            await host.RunAsync();
        }