// GET: Contact/Details/5 public ActionResult Details(int id) { var item = _contactLogic.GetById(id); ReplyViewModel result = new ReplyViewModel() { Id = item.Id, Address = item.Address, Content = item.Content, Email = item.Email, Name = item.Name, Title = item.Title, CreatedDate = item.CreatedDate.ToString("dd-MMM-yyyy hh:mm"), Status = item.Status, Reply = item.Reply, ReplyDate = item.RepliedDate.HasValue? item.RepliedDate.Value.ToString("dd-MMM-yyyy hh:mm") : "", ReplyUser = item.RepliedDate.HasValue ? item.ReplyUser.FirstName + " " + item.ReplyUser.LastName : "" }; return(View(result)); }