public async Task <IActionResult> GetPointsAsync(CancellationToken ct) { if (!ModelState.IsValid) { return(BadRequest(new ApiError(ModelState))); } var points = await _pointsService.GetPointsAsync(ct); var collection = Collection <Point> .Create <PointsResponse>(Link.ToCollection(nameof(GetPointsAsync)), points.Items.ToArray(), points.TotalSize); return(Ok(collection)); }