public IActionResult Page(int accountId, [FromQuery] int currentPage, [FromQuery] int pageSize) { if (accountId == default) { return(BadRequest($"Account id cannot be empty")); } if (currentPage == default || pageSize == default) { return(BadRequest($"Current Page and Page Size cannot be less than 1.")); } var entities = transactionPagingQuery.GetPage(accountId, currentPage, pageSize); return(Ok(transactionMapper.ToModels(entities))); }