public ViewResult About() { var modelView = new MainPageViewModel() { Abouts = _aboutRepository.GetAbout() }; return View(modelView); }
public virtual ActionResult Index() { var model = new MainPageViewModel { Contacts = _contactRepository.GetContact() }; return View(model); }
public ActionResult Browse(int id) { var model = new MainPageViewModel { Categories = _categoryRepository.GetAllCategoryById(id) }; return View(model); }
public virtual ActionResult NavigationAbout() { var model = new MainPageViewModel { Abouts = _aboutRepository.GetAbout().ToList() }; return PartialView(model); }
public virtual ActionResult NavigationCategory() { var model = new MainPageViewModel { Categories = _repositoryCategory.GetCategories().ToList() }; return PartialView(model); }
public virtual ActionResult Index() { var model = new MainPageViewModel { Categories = _repositoryCategory.GetCategories().ToList() }; return View(model); }
public virtual ActionResult Index() { var model = new MainPageViewModel { Categories = _categoryRepository.GetCategories().ToList(), Abouts = _aboutRepository.GetAbout().Take(1).ToList(), About = _aboutRepository.GetAboutById(1) }; return View(model); }
public ActionResult Browse(int id, int page = 1) { var model = new MainPageViewModel { Products = _productRepository.GetAllProductById(id).Where(x => x.CategoryId == id).ToList(), PagingInfo = new PagingInfo { CurrentPage = page, ItemsPerPage = PageSize, TotalItems = _productRepository.GetQueryProducts.Count() } }; return View(model); }
public virtual ActionResult Index(string category, int page = 1) { var model = new MainPageViewModel { Categories = _categoryRepository.GetCategories().ToList(), Products = _productRepository.GetQueryProducts .Where(p => category == null) .OrderBy(p => p.ProductId) .Skip((page - 1) * PageSize) .Take(PageSize), PagingInfo = new PagingInfo { CurrentPage = page, ItemsPerPage = PageSize, TotalItems = _productRepository.GetQueryProducts.Count() }, CurrentCategory = category }; return View(model); }
public ViewResult Index() { var modelView = new MainPageViewModel() { Products = _productRepository.GetProducts() }; return View(modelView); }