0
式functionを使ってフィルタ関数を実装する必要があります。 フィルタリングされたクエリをエンティティに適用することはできません。式関数を適用する
エンティティ:市名 "ベルリン" によってフィルタリング
[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;
}