의 나는 다음과 같은 클래스가있다 :필터 서브는-컬렉션 컬렉션
class Customer
{
public int IdCustomer {get; set}
public string Name {get; set;}
public virtual ICollection<Expertise> Expertises {get; set;}
}
class Expertise
{
public int IdExpertise {get; set;}
public string Description {get; set;}
public virtual ICollection<SubExpertise> SubExpertises {get; set;}
}
class SubExpertise
{
public int IdSubExpertise { get; set;}
public int IdExpertise {get; set;}
public string Description {get; set;}
public virtual Expertise Expertise {get; set;}
}
나는 된 IQueryable를 사용하여 SubExpertise 필터, 필터 상태를 유지할 수 있는가? 기본적으로 나는 SubExpertise에 의해 필터링 할,하지만 쿼리에
예를 더 필터를 추가하기 위해 사용되고 있습니다 유지 : 나는 SubExpertise 'X'또는 'y'를 가지고있는 모든 고객을 싶어요. SubExpertise는 컬렉션의 하위 모음 (전문 지식)입니다. 그리고 나서 나는 새 필터를 가질 수 있습니다. (당신이 그것을 이름을 변경한다)
bool IsXOrY(SubExpertise subExpertise)
{
check if the SubExpertise is 'x' or 'y'
check if the SubExpertise meets other criteria
return true if this SubExpertise meets all your criteria
}
IQueryable 뒤에 무엇이 있습니까? Entity Framework에서 지원되는 조건이 필요합니까? – Mant101
예. 기본적으로 인터페이스 (필터)에서 오는 많은 조건이 있으며 어떤 조건이 사용되는지 확인합니다. – GuFigueiredo