public ActionResult Create(ClientVM clientobj)
 {
     if(ModelState.IsValid)
     {
         var client = Mapper.Map<ClientVM, Client>(clientobj);
         _clientRepo.Add(client);
         return Redirect
     }
 }
예제 #2
0
 public ActionResult Create(ClientVM clientobj)
 {
     if(ModelState.IsValid)
     {
         var client = Mapper.Map<ClientVM, Client>(clientobj);
         _clientService.Add(client);
         return RedirectToAction("Index");
     }
     return View(clientobj);
 }