Roy
Roy

Reputation: 2323

IQueryable efficiency

I'm writing a repositoy now, returning IQueryable results. Does adding filters affect the efficiency? campring to write the clause in the linq.

Such as

IQueryable result = repository.GetAllBooks().Where(book => book.author =="Russell");

Thanks!

Upvotes: 0

Views: 246

Answers (1)

jpoh
jpoh

Reputation: 4586

An equivalent LINQ statement would compile to the Where extension method that you use above so it should behave/perform in the same way.

Upvotes: 1

Related Questions