Пример #1
0
        public IActionResult Get([FromQuery] FoodStyleProductKey id)
        {
            FoodStyleProduct foodStyleProduct = db.GetEntity(id);

            if (foodStyleProduct == null)
            {
                return(NotFound());
            }
            return(new ObjectResult(foodStyleProduct));
        }
Пример #2
0
        public IActionResult Delete([FromQuery] FoodStyleProductKey id)
        {
            FoodStyleProduct foodStyleProduct = db.GetEntity(id);

            if (foodStyleProduct == null)
            {
                return(NotFound());
            }
            db.Delete(id);
            db.Save();
            return(Ok(foodStyleProduct));
        }