示例#1
0
        public ActionResult ShowRecipesByCategoryId(int categoryId)
        {
            IEnumerable <RecipeView> recipes = _recipeProvider.GetRecipesByCategoryId(categoryId);
            ShortRecipeViewModel     model   = ParseShortRecipeViewModels(recipes, categoryId);

            if (Request.IsAjaxRequest())
            {
                return(PartialView("_ShowRecipesByCategoryId", model));
            }
            else
            {
                return(View("ShowRecipesByCategoryId", model));
            }
        }