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