Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo(ConfigurationConstants.APP_CULTURE);
            IWebHostBuilder builder = CreateWebHostBuilder(args);
            IWebHost        host    = builder.Build();

            using IServiceScope scope = host.Services.CreateScope();
            System.IServiceProvider services = scope.ServiceProvider;
            DatabaseContext         context  = services.GetRequiredService <DatabaseContext>();

            DatabaseInit.Execute(context);

            host.Run();
        }