public ActionResult Recepti() { OpRecipesBase opRecipes = new OpRecipesBase(); var resultrecept = _manager.executeOperation(opRecipes); PocetnaViewModel vm = new PocetnaViewModel { Recepti = (resultrecept.Items as RecipesDto[]).ToList() }; return(View(vm)); }
public ActionResult Index() { OpSliderBase op = new OpSliderBase(); var result = _manager.executeOperation(op); OpBlogBase opBlog = new OpBlogBase(); var resultBlog = _manager.executeOperation(opBlog); OpRecipesBase opRecipes = new OpRecipesBase(); var resultrecept = _manager.executeOperation(opRecipes); PocetnaViewModel vm = new PocetnaViewModel { Slider = result.Items[0] as SliderDto, Blog = (resultBlog.Items as BlogDto[]).ToList(), Recepti = (resultrecept.Items as RecipesDto[]).ToList() }; return(View(vm)); }