public ActionResult Index() { AuctionViewModel vModel = new AuctionViewModel(); vModel.PageTitle = "Home Page"; vModel.PageDescription = "I am home page"; vModel.AllAuctions = service.GetAllAuction(); vModel.PromotedAuctions = service.GetPromotedAuction(); return(View(vModel)); }
public ActionResult Index() { AuctionsViewModel vmodel = new AuctionsViewModel(); vmodel.PageTitle = "Home Page"; vmodel.PageDescription = "This is Home Page"; vmodel.AllAuctions = service.GetAllAuction(); vmodel.PromoteAuctions = service.GetPromotedAuction(); return(View(vmodel)); }
public ActionResult Index() { AuctionsService auctionservice = new AuctionsService(); ListingAuctionsViewModel model = new ListingAuctionsViewModel(); model.Auctions = auctionservice.GetAllAuction(); if (Request.IsAjaxRequest()) { return(PartialView(model)); } else { return(View(model)); } }