IQueryable Where fails to work

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-06-08T22:17:31Z Indexed on 2010/06/08 22:22 UTC
Read the original article Hit count: 220

Filed under:
|
|

I am using N-Hibernate and have a class/table called Boxers

I also have a prospect table which tells use if the boxer is a prospect. (this table is one column of just the boxersID)

So i Want to get all boxers that are prospects (meaning all boxers that have there id in the prospects table)

Public static IQueryable<Boxer> IsProspect(this IQueryable<Boxer> query)
{
return query.Where(x => x.Prospect != null);
}

this doesnt trim down my list of boxers to the boxers that are prospect... yet if i debug and look at any boxer it will have True or false next to each one correctly...

Why isnt the where clause correctly trimming down the list?

© Stack Overflow or respective owner

Related posts about c#

Related posts about nhibernate