【发布时间】:2020-09-14 12:35:31
【问题描述】:
"((IEnumerable)sourceData).Cast().Select(ob =>
new
{
SenderId = "Expo-HSE-01",
IssueId = ob.IncidentNo.Value,
IssuePointId = String.Join(",", ((IEnumerable)ob.TypeofIncident)
.Cast()
.Select(ip => ip.Value)),
IssueTypeId = "Issue-HSE-General",
ZoneId = ob.Location.LocationCode.Value
}"
以字符串形式获取上述查询需要在运行时执行。
【问题讨论】:
-
一切都在运行时执行。什么意思?
-
那么 sourceData 的类型是什么,您希望得到什么结果?
-
@itsme86 OP 得到一个字符串,需要将其转换成可执行代码。
-
@Santosh 到目前为止您尝试过什么? (how-to-ask page)