【发布时间】:2010-08-27 18:41:06
【问题描述】:
我的查询的返回类型是IEnumerable<XElement>。如何将结果数据转换为XElement 类型?是否可以?有人可以帮助我理解这一点。
var resQ = from e in docElmnt.Descendants(xmlns + Constants.T_ROOT)
.Where(x => x.Attribute(Constants.T_ID).Value == "testid")
select e;
我必须将 resQ 作为参数传递给下面的函数。为此,我必须将 resQ 转换为 XElement 类型。
Database.usp_InsertTestNQuestions(tid, qId, qstn, ans, resQ );
【问题讨论】:
标签: ienumerable xelement