コード例 #1
0
        public async Task <IActionResult> Get(int id)
        {
            var archetype = await _archetypeService.GetDataForConcreteArchetypePage(id);

            if (archetype == null)
            {
                return(NotFound($"Archetype with id equal {id} not found."));
            }

            var dto = _archetypeToDtoConverter.Convert(archetype);

            dto.Statistics = dto.Statistics.OrderBy(x => x.DateWhenArchetypeWasUsed);
            return(Ok(dto));
        }