public JsonResult AddNewIngredient([FromBody] Ingredient ingredient) { if (ingredient == null) { return(Json(new { errors = "Ingredient is NULL" })); } return(Json(_dbService.CreateElement(ingredient))); }
public JsonResult AddNewRecipe([FromBody] Recipe recipe) { if (recipe == null) { return(Json(new { errors = "Recipe is NULL" })); } return(Json(_dbService.CreateElement(recipe))); }