Пример #1
0
        //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);
        }
Пример #2
0
        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);
        }