public RegisterTransferResponse Post(RegisterTransferRequest req) { var transfer = new Transfer(req.Value, req.TransferDate); _repo.Save(transfer); _unitOfWork.Commit(); return(new RegisterTransferResponse(transfer)); }
public IActionResult Post([FromBody] RegisterTransferRequest req) { try { var response = _handler.Post(req); return(Ok(response)); } catch (Exception ex) { return(BadRequest(ex)); } }