Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Threading.Tasks;
- using FootballSystemHomework.Data.Context;
- using FootballSystemHomework.Data.Models;
- using Microsoft.AspNetCore;
- using Microsoft.AspNetCore.Hosting;
- using Microsoft.Extensions.Configuration;
- using Microsoft.Extensions.DependencyInjection;
- using Microsoft.Extensions.Logging;
- namespace FootballSystemHomework
- {
- public class Program
- {
- public static void Main(string[] args)
- {
- var host = CreateWebHostBuilder(args).Build();
- using (var scope = host.Services.CreateScope())
- {
- var services = scope.ServiceProvider;
- var context = services.GetRequiredService<FootballContext>();
- SeedData.Initialize(services);
- }
- host.Run();
- }
- public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .UseStartup<Startup>();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement