public async Task <ActionResult <string> > Get()
        {
            IEnumerable <TransactionsDTO> transactions = null;

            try
            {
                transactions = await _transactionsService.GetAsync();

                return(JsonConvert.SerializeObject(transactions));
            }
            catch (Exception err)
            {
                _logger?.LogError("Transactions controller exception: " + err.Message);

                return(null);
            }
        }
Ejemplo n.º 2
0
 public async Task <IActionResult> GetTransactions([FromQuery] FilterModel filter)
 {
     return(Ok(await _transactionsService.GetAsync(filter)));
 }