Created
February 28, 2019 12:59
-
-
Save shibayan/865dbcd56fc41a3829120f215244e96a 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
using System; | |
using Microsoft.AspNetCore; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration.AzureAppConfiguration; | |
namespace WebApplication19 | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
CreateWebHostBuilder(args).Build().Run(); | |
} | |
public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | |
WebHost.CreateDefaultBuilder(args) | |
.ConfigureAppConfiguration((hostingContext, config) => | |
{ | |
var settings = config.Build(); | |
config.AddAzureAppConfiguration(options => | |
{ | |
options.ConnectionString = settings["ConnectionStrings:AppConfig"]; | |
options.Use("*", preferredDateTime: new DateTimeOffset(2019, 2, 28, 19, 0, 0, TimeSpan.FromHours(9))); | |
}); | |
}) | |
.UseStartup<Startup>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment