public WeatherForecastController(ILogger <WeatherForecastController> logger, ADBContext context ) { this.logger = logger; this.context = context; }
public IQueryable <Product> GetCategories() { var db = new ADBContext(); if (db.Products.Count() == 0) { var getproduct = new ProductInitializer(); db.Products.AddRange(getproduct.GetProducts()); db.SaveChanges(); } IQueryable <Product> query = db.Products; return(query); }
public Search() { client = new AlgoliaClient("H32KJL7TN3", "ded83594a24bb787256ec5c09acfd98d"); db = new ADBContext(); this.AddIndexes(); }