public JsonResult UpdateAuctions(string AuctionIDs) { JsonResult result = new JsonResult(); result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = auctionsService.GetAllAuctions().Select(x => new { ID = x.ID, BidAmount = x.ActualAmount + x.BidAmount }); return(result); }
public ActionResult Index() { AuctionsViewModel vModel = new AuctionsViewModel(); vModel.PageTitle = "Marketplace"; vModel.PageDescription = "Auctions Page"; var auctions = service.GetAllAuctions(); vModel.AllAuctions = new List <Entities.Auction>(); vModel.AllAuctions.AddRange(auctions); //vModel.AllAuctions.RemoveAt(0); vModel.PromotedAuctions = service.GetPromotedAuctions(); return(View(vModel)); }