public IActionResult Get([FromQuery] FoodStyleProductKey id) { FoodStyleProduct foodStyleProduct = db.GetEntity(id); if (foodStyleProduct == null) { return(NotFound()); } return(new ObjectResult(foodStyleProduct)); }
public IActionResult Delete([FromQuery] FoodStyleProductKey id) { FoodStyleProduct foodStyleProduct = db.GetEntity(id); if (foodStyleProduct == null) { return(NotFound()); } db.Delete(id); db.Save(); return(Ok(foodStyleProduct)); }