public ActionResult Create([Bind(Include = "Name")] RepairPlaceVM repairPlaceVM) { if (ModelState.IsValid) { RepairPlaceDTO repairPlaceDTO = Mapper.Map <RepairPlaceDTO>(repairPlaceVM); RepairPlaceService.Add(repairPlaceDTO); return(RedirectToAction("Index")); } return(View()); }
public ActionResult Details(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RepairPlaceDTO repairPlaceDTO = RepairPlaceService.Get((Guid)id); if (repairPlaceDTO == null) { return(HttpNotFound()); } RepairPlaceVM repairPlaceVM = Mapper.Map <RepairPlaceVM>(repairPlaceDTO); return(View(repairPlaceVM)); }