public async Task <IReadOnlyList <WordListItemModel> > FindAllAsync(Guid userId)
        {
            var items = await _repository.FindAllAsync(userId);

            return(items
                   .OrderBy(x => x.Word)
                   .ToList());
        }
Beispiel #2
0
        public async Task AddLearnedWordsAsync(LearnedWordsCommandModel command)
        {
            var items = await _repository.FindAllAsync(command.UserId, command.Words);

            foreach (var item in items)
            {
                item.IsLearned = true;
            }

            await _repository.UpdateAllAsync(items);
        }