// GET: api/WebApiClient/5 public IHttpActionResult GetOneProject(int id) { Client C = CS.GetById(id); if (C == null) { return(NotFound()); } return(Ok(C)); }
public async Task <IActionResult> GetMovements(Guid accountNumber) { AccountMovementResponseDto dto = new AccountMovementResponseDto(); var bankAccount = await bankAccountServices.GetBankAccountByAccountNumber(accountNumber); if (bankAccount == null) { return(NotFound()); } var client = await clientServices.GetById(bankAccount.ClientId); var result = await accountMovementServices.GetMovements(accountNumber); var totalAmount = await accountMovementServices.GetTotalAmount(accountNumber); dto.FullName = client.FullName; dto.Product = bankAccount.Product; dto.Balance = totalAmount; dto.accountMovement = mapper.Map <IEnumerable <AccountMovementDto> >(result); var response = new ApiResponse <AccountMovementResponseDto>(dto); return(Ok(response)); }
public async Task <Client> Get() { return(await _clientServices.GetById(1)); }
public ClientViewModel Get(Guid key) { var resultService = _clientServices.GetById(key); return(_mapper.Map <ClientViewModel>(resultService)); }
public ActionResult <Client> GetById(int id) { var client = _clientService.GetById(id); return(Ok(client)); }