Exemplo n.º 1
0
        /// <summary>
        /// Найти все колоды.
        /// </summary>
        public async Task <IEnumerable <IDeck> > FindAll()
        {
            var decks = new List <IDeck>();

            var dtos = await _storage.GetAll();

            if (dtos.Any())
            {
                decks.AddRange(dtos.Select(d => MapDeckFromDTO(d)));
            }

            return(decks);
        }
Exemplo n.º 2
0
 public IActionResult GetAllDeckNames()
 {
     return(Ok(new { names = deckStorage.GetAll().Select(deck => deck.Name) }));
 }