Exemple #1
0
        public async Task <ActionResult <IEnumerable <IterationDto> > > GetIterations()
        {
            var iterations = await _iterationRepository.GetIterationsAsync();

            IEnumerable <IterationDto> result = _mapper.Map <IEnumerable <IterationDto> >(iterations);

            return(Ok(result));
        }
Exemple #2
0
        public async Task <object> GetAllWorkItems()
        {
            var workitems = await _workItemRepository.GetWorkItems();

            var iterations = await _iterationRepository.GetIterationsAsync();

            var result = from i in iterations
                         join wi in workitems on i.Id equals wi.IterationId
                         select new
            {
                Id           = wi.Id,
                Title        = wi.Title,
                Description  = wi.Description,
                Iteration    = i.Title,
                IterationId  = i.Id,
                Created      = wi.Created,
                Priority     = wi.Priority,
                State        = wi.State,
                LastModified = wi.LastModified.Value,
            };

            return(result.ToList());
        }