Esempio n. 1
0
        public SingleRsp UpdateFoodCategory(FoodCategoryReq cate)
        {
            var res        = new SingleRsp();
            var cateUpdate = new FoodCategories()
            {
                CategoryName = cate.CategoryName
            };

            res = _rep.UpdateFoodCategory(cateUpdate);
            return(res);
        }
Esempio n. 2
0
        public SingleRsp CreateFoodCategory(FoodCategoryReq cate)
        {
            var res     = new SingleRsp();
            var cateNew = new FoodCategories()
            {
                CategoryId   = cate.CategoryId,
                CategoryName = cate.CategoryName
            };

            res = _rep.CreateFoodCategory(cateNew);
            return(res);
        }
        public IActionResult DeleteFoodCategory([FromBody] FoodCategoryReq req)
        {
            var res = _svc.DeleteFoodCategory(req.CategoryId);

            return(Ok(res));
        }
        public IActionResult UpdateFoodCategory([FromBody] FoodCategoryReq req)
        {
            var res = _svc.UpdateFoodCategory(req);

            return(Ok(res));
        }