コード例 #1
0
        public ActionResult Create(ClientViewModel client)
        {
            if (ModelState.IsValid)
            {
                var clientDomain = Mapper.Map<ClientViewModel, Client>(client);

                _clientAppService.Add(clientDomain);

                return RedirectToAction("Index");
            }

            return View(client);
        }
コード例 #2
0
        // 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);
        }