Search a List inside another with IQueryable
Posted
by
ovini poornima
on Stack Overflow
See other posts from Stack Overflow
or by ovini poornima
Published on 2012-04-08T05:19:46Z
Indexed on
2012/04/08
5:29 UTC
Read the original article
Hit count: 130
entity-framework
|lambda
public static IQueryable<Institution> WithFunds(this IQueryable<Institution> query, IEnumerable<Fund> allowedFunds)
{
return query.
}
I want to get the query to return all Institutions having any of the Fund given in 'allowedFunds' list in Institution.Funds. Please help.
My class hierarchy goes like this.
public partial class Institution
{
public int Id { get; set; }
public virtual ICollection<Fund> Funds { get; set; }
}
public partial class Fund
{
public int Id { get; set; }
public virtual Institution Institution { get; set; }
}
© Stack Overflow or respective owner