//public RecipeModel GetRecipe(string id) //{ // return RecipeDL.GetRecipes(int.Parse(id)); //} public RecipeServiceResponse GetRecipes() { RecipeServiceResponse response = new RecipeServiceResponse(); //try //{ // response.recipes = RecipeDL.GetRecipes(); //} //catch(Exception ex) //{ // response.ex = ex; //} return(response); }
public RecipeServiceResponse DeleteRecipe(DeleteRecipeRequest request) { RecipeServiceResponse response = new RecipeServiceResponse(); try { int numOfDeleted = BusinessFacade.Instance.DeleteRecipe(request.recipeId); response.status = numOfDeleted == 1; response.deletedId = request.recipeId; } catch (Exception ex) { response.ex = ex; response.status = false; } return(response); }