public BusParkUI() { var builder = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", false, true); IConfigurationRoot configurationRoot = builder.Build(); ConnectionString = configurationRoot.GetConnectionString("DebugConnectionString"); ProviderName = configurationRoot.GetSection("AppConfig").GetChildren().Single(item => item.Key == "ProviderName").Value; context = new BusParkContext(ConnectionString, ProviderName); stoService = new StoService(context); }
public StoService(BusParkContext context) { this.context = context; }