Пример #1
0
        public IHttpActionResult GetById(int id)
        {
            var account = _accountsService.GetById(id);

            CheckingAccountViewModel accountViewModel = new CheckingAccountViewModel();

            accountViewModel = Mapper.Map <CheckingAccount, CheckingAccountViewModel>(account);

            return(HandleCallback(() => accountViewModel));
        }
Пример #2
0
 public async Task AddAsync(CheckingAccountViewModel model)
 {
     await _checkingAccountService.AddAsync(_mapper.Map <CheckingAccount>(model));
 }