public async Task <IActionResult> GetTaskWithPaginate(int customerId) { try { var result = await _services.GetCarts(customerId); if (result?.Count > 0) { return(Ok(result)); } return(NotFound()); } catch (KeyNotFoundException) { return(BadRequest()); } }