public DeleteRepairViewModel GetRepairForDeletion(int id) { Repair repair = this.Context.Repairs.Find(id); DeleteRepairViewModel viewModel = Mapper.Map <DeleteRepairViewModel>(repair); return(viewModel); }
public ActionResult Delete(int id) { DeleteRepairViewModel viewModel = this.service.GetRepairForDeletion(id); return(View("~/Areas/Repairs/Views/Delete.cshtml", viewModel)); }