예제 #1
0
 public WeatherForecastController(ILogger <WeatherForecastController> logger,
                                  ADBContext context
                                  )
 {
     this.logger  = logger;
     this.context = context;
 }
예제 #2
0
        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);
        }
예제 #3
0
 public Search()
 {
     client = new AlgoliaClient("H32KJL7TN3", "ded83594a24bb787256ec5c09acfd98d");
     db     = new ADBContext();
     this.AddIndexes();
 }