static void Main(string[] args) { var spec1 = new ShortbookSpecification(); var spec2 = new AuthorSpecification("Author1"); using (var ctx = new BookContext()) { var repository = new AudioBookRepository(ctx); var spec2Converted = FilterConverter.ConvertSpecification <Book, AudioBook>(spec2); var results = repository.List(spec2Converted); } }