public IHttpActionResult GetById(int id) { var account = _accountsService.GetById(id); CheckingAccountViewModel accountViewModel = new CheckingAccountViewModel(); accountViewModel = Mapper.Map <CheckingAccount, CheckingAccountViewModel>(account); return(HandleCallback(() => accountViewModel)); }
public async Task AddAsync(CheckingAccountViewModel model) { await _checkingAccountService.AddAsync(_mapper.Map <CheckingAccount>(model)); }