public DetailsNotebookVm GetDetailNotebookVM(int id) { Notebooks notebook = Context.Items.OfType <Notebooks>().FirstOrDefault(book => book.Id == id); DetailsNotebookVm vm = Mapper.Map <Notebooks, DetailsNotebookVm>(notebook); return(vm); }
public ActionResult Details(int Id) { DetailsNotebookVm vm = service.GetDetailNotebookVM(Id); return(View(vm)); }