0
표현식 매개 변수로 필터 함수를 구현해야합니다. 필터링 된 쿼리를 엔티티에 적용 할 수 없습니다.표현식 함수 적용
엔티티 : 도시 이름 "베를린"에 의해 필터링
[XmlRoot(ElementName = "Zip")]
public class Zip
{
[XmlAttribute(AttributeName = "code")]
public string Code { get; set; }
}
[XmlRoot(ElementName = "District")]
public class District
{
[XmlElement(ElementName = "Zip")]
public List<Zip> Zip { get; set; }
[XmlAttribute(AttributeName = "name")]
public string Name { get; set; }
}
[XmlRoot(ElementName = "City")]
public class City
{
[XmlElement(ElementName = "District")]
public List<District> District { get; set; }
[XmlAttribute(AttributeName = "name")]
public string Name { get; set; }
[XmlAttribute(AttributeName = "code")]
public string Code { get; set; }
}
[XmlRoot(ElementName = "AddressInfo")]
public class AddressInfo
{
[XmlElement(ElementName = "City")]
public List<City> City { get; set; }
}
테스트 케이스. 어떻게 함수로 술어를 적용 할 수 있습니까?
public IConverter<T> Filter(Expression<Func<T, bool>> predicate)
{
// ???
return this;
}