예제 #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));
 }