public DetailsDescCompVM GetDetailNotebookVM(int id) { DeskComputers deskComputer = Context.Items.OfType <DeskComputers>().FirstOrDefault(desk => desk.Id == id); DetailsDescCompVM vm = Mapper.Map <DeskComputers, DetailsDescCompVM>(deskComputer); return(vm); }
public ActionResult Details(int Id) { DetailsDescCompVM vm = service.GetDetailNotebookVM(Id); return(View(vm)); }