Exemplo n.º 1
0
        public async Task<IActionResult> GetNotImplementedMarkers(int start, int pageSize)
        {
            GoNorthProject project = await _userProjectAccess.GetUserProject();
            Task<List<MarkerImplementationQueryResultObject>> queryTask;
            Task<int> countTask;
            queryTask = _mapDbAccess.GetNotImplementedMarkers(project.Id, start, pageSize);
            countTask = _mapDbAccess.GetNotImplementedMarkersCount(project.Id);
            Task.WaitAll(queryTask, countTask);

            MarkerImplementationQueryResult queryResult = new MarkerImplementationQueryResult();
            queryResult.Markers = queryTask.Result;
            queryResult.HasMore = start + queryResult.Markers.Count < countTask.Result;
            return Ok(queryResult);
        }