It's possible to do the following:
IEnumerable<Person> people = Enumerable.Empty<Person>();
Is there an equivalent for IQueryable...?
IQueryable<Person> people = Queryable.Empty<Person>();
It's possible to do the following:
IEnumerable<Person> people = Enumerable.Empty<Person>();
Is there an equivalent for IQueryable...?
IQueryable<Person> people = Queryable.Empty<Person>();
As you have already probably noticed there is no Queryable.Empty
extension method. You can simulate this by using other extensions methods, such as Where
:
var empty = collection.Where(c => false);