public IActionResult GetListPaginated(long accountId, [FromQuery] int page = 0, [FromQuery] int pageSize = 10) { try { List <AccountDto> accounts = _accountQueries.GetListPaginated(accountId, page, pageSize); return(StatusCode(StatusCodes.Status200OK, accounts)); } catch (Exception ex) { //TODO: Log exception async, for now write exception in the console Console.WriteLine(ex.Message); return(StatusCode(StatusCodes.Status500InternalServerError, new ApiStringResponse(ApiConstants.InternalServerError))); } }