// GET: Admin/Category public ActionResult Index() { OpCategoriesBase op = new OpCategoriesBase(); var items = _manager.ExecuteOperation(op); return(View(items.Items as CategoryDTO[])); }
private CategoryDto getInstance(int id) { OpCategoriesBase op = new OpCategoriesBase(); op.Criteria.Id = id; var result = _manager.ExecuteOperation(op); CategoryDto dto = result.Items[0] as CategoryDto; return(dto); }
public ActionResult Index() { OpPostBase op = new OpPostBase(); var postovi = _manager.ExecuteOperation(op); OpCategoriesBase op3 = new OpCategoriesBase(); var categories = _manager.ExecuteOperation(op3); OpHeaderBase op2 = new OpHeaderBase(); var header = _manager.ExecuteOperation(op2); HomeViewModel home = new HomeViewModel { Posts = (postovi.Items as PostDTO[]).ToList(), Categories = (categories.Items as CategoryDTO[]).ToList(), Broj = postovi.Broj, Header = header.Items[0] as HeaderDTO, HotPost = postovi.Items[0] as PostDTO }; return(View(home)); }