public ActionResult Details(int id) { var offer = _offersProvider.GetOffer(id); var offerDetails = new OfferViewModel() { CompanyName = offer.Company.Name, CompanyId = offer.Company.Id, Date = offer.Date.ToShortDateString(), Title = offer.Title, Description = offer.Description, Id = id, Type = offer.Type.Name }; return(View(offerDetails)); }
public JsonResult Details(int id) { var details = _offersProvider.GetOffer(id).ToViewModel(); return(Json(details, JsonRequestBehavior.AllowGet)); }