Exemple #1
0
        public async Task Execute()
        {
            byte[] latestRevision = _searchStringRepo.GetLatestRevision();
            IEnumerable <SearchString> searchStrings = (latestRevision == null) ?
                                                       await _dataStore.SelectSearchStrings() :
                                                       await _dataStore.SelectSearchStrings(latestRevision);

            Log.Information("{0} Search String(s) Updated or Added since last sync.", searchStrings.Count());
            if (searchStrings.Any())
            {
                _searchStringRepo.InsertMany(searchStrings);
            }
        }
Exemple #2
0
 public byte[] GetLatestRevision()
 {
     return(_searchStringRepo.GetLatestRevision());
 }