Beispiel #1
0
        public ResponseSearchTransaction SearchTransaction(RequestSearchTransaction request)
        {
            ResponseSearchTransaction response = new ResponseSearchTransaction();

            if (request.Filter == null)
            {
                throw new ArgumentNullException("Bad Request");
            }

            response.transactions = _business.SearchTransaction(request.Filter);

            foreach (Transaction transaction in response.transactions)
            {
                response.TransactionsTotal += transaction.Value;
            }

            return(response);
        }
Beispiel #2
0
 public ResponseSearchTransaction Search([FromQuery] RequestSearchTransaction request)
 {
     return(Task.Run(async() => await Service.SearchTransaction(request)).Result);
 }
 public Task <ResponseSearchTransaction> SearchTransaction(RequestSearchTransaction request)
 {
     return(Task.Run(() => {
         return _service.SearchTransaction(request);
     }));
 }