コード例 #1
0
        public IActionResult GetProductsInGroup(int index, int numberOfRecord)
        {
            var _dbContext = new MithilaProductsContext();
            var records    = _dbContext.Products.Skip(index * numberOfRecord).Take(numberOfRecord);

            return(new JsonResult(records));
        }
コード例 #2
0
        public IActionResult GetProductById(string id)
        {
            var _dbContext = new MithilaProductsContext();

            return(new JsonResult(_dbContext.Products.ToList().Where(m => m.ProductId.Equals(id))));
        }
コード例 #3
0
        public IActionResult GetProducts()
        {
            var _dbContext = new MithilaProductsContext();

            return(new JsonResult(_dbContext.Products.ToList()));
        }