private async Task <List <string> > LoadWatchWordsAsync(IWatchWordsRepository watchWordsRepository) { var watchWords = await watchWordsRepository.GetAllAsync(); var result = watchWords .Select(ww => ww.Word) .ToList(); return(result); }
private async Task <List <string> > FindWatchWordMatchesAsync(IWatchWordsRepository watchWordsRepository, List <string> words) { var watchWords = await GetWatchWordsAsync(watchWordsRepository); var matches = watchWords .Intersect(words) .ToList(); return(matches); }
private async Task <List <string> > GetWatchWordsAsync(IWatchWordsRepository watchWordsRepository) { var watchWords = await _watchWordsLazy.GetValueAsync(() => LoadWatchWordsAsync(watchWordsRepository)); return(watchWords); }
public TextProcessingDataContext(IDbContextFactory <UniqueWordsDbContext> dbContextFactory) : base(dbContextFactory) { WordsRepository = new WordsRepository(DbContext); WatchWordsRepository = new WatchWordsRepository(DbContext); }