// GET: CustomerController/Details/5 public ActionResult Details(int id) { if (!_repo.isExists(id)) { return(NotFound()); } var customer = _repo.FindById(id); var cust = _mapper.Map <CustomerVM>(customer); return(View(cust)); }