public async Task RemoveVocabularyItem(VocabularyItemIdInput vocabularyItemIdInput) { var item = await _vocabularyItemRepository.FirstOrDefaultAsync(c => c.Id == vocabularyItemIdInput.Id) .ConfigureAwait(false); if (item != null) { await _vocabularyItemRepository.DeleteAsync(item).ConfigureAwait(false); } }
public async Task DisableVocabularyItem(VocabularyItemIdInput vocabularyItemIdInput) { var item = await _vocabularyItemRepository.FirstOrDefaultAsync(c => c.Id == vocabularyItemIdInput.Id) .ConfigureAwait(false); if (item != null) { item.Disabled(); } }