Ejemplo n.º 1
0
 public IActionResult Add(DevelopmentAreaViewModel davm)
 {
     if (ModelState.IsValid)
     {
         Mapper.Initialize(cfg => cfg.CreateMap <DevelopmentAreaViewModel, DevelopmentAreaDTO>());
         var daDto = Mapper.Map <DevelopmentAreaViewModel, DevelopmentAreaDTO>(davm);
         _requestService.AddDevelopmentArea(daDto);
         return(RedirectToAction(nameof(Index)));
     }
     return(View());
 }