Exemplo n.º 1
0
        private async Task SaveNewResultsToDatabaseAsync(string searchTerm)
        {
            var entitiesToDelete = _repository.GetBySearchTerm(searchTerm).ToList();
            await _repository.DeleteRange(entitiesToDelete);

            await _repository.AddRange(DisplayedResults);
        }
Exemplo n.º 2
0
 public void OnPostAsync(string searchTerm)
 {
     Message          = $"Search term = {searchTerm}";
     DisplayedResults = _repository.GetBySearchTerm(searchTerm).ToList();
 }