using System.Collections.Generic; using System.Linq; using Portoa.Persistence; using Portoa.Search; namespace VideoGameQuotes.Web.Search { public class SearchService : ISearchService where T : Entity { private readonly IRepository repository; public SearchService(IRepository repository) { this.repository = repository; } [UnitOfWork] public IEnumerable FindByIds(IEnumerable ids) { return repository .Records .Where(entity => ids.ToArray().Contains(entity.Id)); } [UnitOfWork] public IEnumerable GetAllIndexableRecords() { return repository.Records; } } }