internal string Delete(int id) { var data = GetById(id); _repo.Delete(id); return("Deleted"); }
internal Recipe Delete(int id) { Recipe recipeToRemove = GetOne(id); _repo.Delete(recipeToRemove); return(recipeToRemove); }
internal void Delete(int id, string creatorId) { Recipe recipe = GetById(id); if (recipe.CreatorId != creatorId) { throw new Exception("You cannot delort another users recipe!"); } if (!_repo.Delete(id)) { throw new Exception("Something has gone terribly wrong!"); } }
internal void Delete(int id, string creatorId) { Recipe recipe = GetById(id); if (recipe.CreatorId != creatorId) { throw new Exception("You can't delete another user's recipe"); } if (!_repo.Delete(id)) { throw new Exception("Something is Wrong"); } ; }
public void Delete(Guid id) { _repo.Delete(id); }