Created
October 4, 2017 13:24
-
-
Save alexdresko/866f02d35bfbcfe60c4c4caf4d2fed77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IWebHost BuildWebHost(string[] args) | |
{ | |
var config = new ConfigurationBuilder() | |
.SetBasePath(Directory.GetCurrentDirectory()) | |
.AddJsonFile("appsettings.json"); | |
return WebHost.CreateDefaultBuilder(args) | |
.ConfigureAppConfiguration((context, builder) => { | |
builder.AddEntityFrameworkConfig(options => options.UseSqlServer(config.GetConnectionString("DefaultConnection"))); | |
}); | |
}) | |
.UseStartup<Startup>() | |
.Build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment