SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using FootballSystemHomework.Data.Context;
  7. using FootballSystemHomework.Data.Models;
  8. using Microsoft.AspNetCore;
  9. using Microsoft.AspNetCore.Hosting;
  10. using Microsoft.Extensions.Configuration;
  11. using Microsoft.Extensions.DependencyInjection;
  12. using Microsoft.Extensions.Logging;
  13.  
  14. namespace FootballSystemHomework
  15. {
  16.     public class Program
  17.     {
  18.         public static void Main(string[] args)
  19.         {
  20.             var host = CreateWebHostBuilder(args).Build();
  21.  
  22.             using (var scope = host.Services.CreateScope())
  23.             {
  24.                 var services = scope.ServiceProvider;
  25.  
  26.                 var context = services.GetRequiredService<FootballContext>();
  27.                 SeedData.Initialize(services);
  28.  
  29.             }
  30.             host.Run();
  31.         }
  32.  
  33.         public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
  34.             WebHost.CreateDefaultBuilder(args)
  35.                 .UseStartup<Startup>();
  36.     }
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top