// GET : CPU/Details/{id} public ActionResult Details(int id) { var service = new CPUService(); var model = service.GetCpuById(id); return(View(model)); }
// GET : CPU/Delete/{id} public ActionResult Delete(int id) { var service = new CPUService(); var model = service.GetCpuById(id); if (model == null) { return(HttpNotFound()); } return(View(model)); }
// GET : CPU/Edit/{id} public ActionResult Edit(int id) { var service = new CPUService(); var detail = service.GetCpuById(id); var model = new CPUEdit { CpuId = detail.CpuId, Manufacturer = detail.Manufacturer, Series = detail.Series, CoreFamily = detail.CoreFamily, Name = detail.Name, CoreCount = detail.CoreCount, CoreClock = detail.CoreClock, BoostClock = detail.BoostClock, Socket = detail.Socket, IsAvailable = detail.IsAvailable, MicroArchitecture = detail.MicroArchitecture, ThermalDesignPower = detail.ThermalDesignPower, IntegratedGraphics = detail.IntegratedGraphics, SimultaneousMultithreading = detail.SimultaneousMultithreading }; return(View(model)); }