public ActionResult Create(ClientViewModel client) { if (ModelState.IsValid) { var clientDomain = Mapper.Map<ClientViewModel, Client>(client); _clientAppService.Add(clientDomain); return RedirectToAction("Index"); } return View(client); }
// GET: Clients public ActionResult Accounts(ClientViewModel client) { var clientViewModel = Mapper.Map<IEnumerable<Account>, IEnumerable<AccountViewModel>>(_clientAppService.GetAccounts(Mapper.Map<ClientViewModel, Client>(client))); return View(clientViewModel); }