大家帮我看看这个用的什么技术,为什么没见过
var a = from x in xml.Descendants("CardsClass")
from y in xml.Descendants("item")
where x.Attribute("cardclassID").Value.Equals("1000") && y.Parent.Equals(x)
select new { ClassID = y.Attribute("itemID").Value, ClassName = y.Attribute("text").Value };
[解决办法]
Linq的查询表达式,说实话我很讨厌这种sql式的形式...个人更喜欢Lambda表达式,清晰易读...基本不在正式项目中用Linq查询表达式...
[解决办法]
[解决办法]
对于相对复杂的查询
我觉得标准表达式要比LAMDA表达 在表现逻辑上更清晰
更容易被其他人看懂