Exemple #1
0
 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());
 }
Exemple #2
0
        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));
        }