public ExamWorkUI() { var builder = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", false, true); IConfigurationRoot configurationRoot = builder.Build(); var ConnectionString = configurationRoot.GetConnectionString("DebugConnectionString"); var ProviderName = configurationRoot.GetSection("AppConfig").GetChildren().Single(item => item.Key == "ProviderName").Value; context = new ExamWorkContext(ConnectionString, ProviderName); stockService = new StockService(context); searchUI = new SearchUI(context); }
public SearchUI(ExamWorkContext context) { this.context = context; }
public StockService(ExamWorkContext context) { this.context = context; }