public ActionResult AddOrEditRecipeIngridient(int recipeId, int ingridientId) { RecipeIngridientView recipeIngridient = null; if (ingridientId != 0) { recipeIngridient = _recipeProvider.GetRecipeIngridient(recipeId, ingridientId); } EditRecipeIngridientViewModel model = ParseRecipeIngridient(recipeIngridient, recipeId); if (Request.IsAjaxRequest()) { return(PartialView("_AddOrEditRecipeIngridient", model)); } else { return(View("AddOrEditRecipeIngridient", model)); } }