static void Main(string[] args) { var optionsBuilder = new DbContextOptionsBuilder <LiveyTvContext>(); StreamHubCoreDal.AppConfig.AppConfiguration appConfiguration = new StreamHubCoreDal.AppConfig.AppConfiguration(); optionsBuilder.UseSqlServer(appConfiguration.ConnectionString); liveyTvContext = new LiveyTvContext(optionsBuilder.Options); iterateAllFiles("D:\\programming3\\livey\\Data-Scrapping\\Data"); }
private static List <Item> CollectAllDBItemsEntered() { LiveyTvContext liveyTvContext; var optionsBuilder = new DbContextOptionsBuilder <LiveyTvContext>(); StreamHubCoreDal.AppConfig.AppConfiguration appConfiguration = new StreamHubCoreDal.AppConfig.AppConfiguration(); optionsBuilder.UseSqlServer(appConfiguration.ConnectionString); liveyTvContext = new LiveyTvContext(optionsBuilder.Options); List <Item> lstItemsEnteredToday = new List <Item>(); lstItemsEnteredToday = liveyTvContext.Items.Where(x => x.createDate >= DateTime.Today.AddDays(-1)).ToList(); return(lstItemsEnteredToday); }