我试过这两个,但没有工作?怎么做?SelectMany里面SelectMany
.SelectMany(x => x.SectionEvents).SelectMany(t => t.Section)
.SelectMany(x => x.SectionEvents.SelectMany(t => t.Section))
错误:
的类型参数方法 '
System.Linq.Enumerable.SelectMany<TSource,TResult>(System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource,System.Collections.Generic.IEnumerable<TResult>>)
' 不能从使用中推断出来。尝试明确指定类型参数 。
EEvent.List<EEvent>("CalendarPeriodUId", ECalendarPeriod.Current().UId).Value.ToList()
.SelectMany(x => x.SectionEvents.SelectMany(t => t.Section)).ToFCollection().Bind(ddlSection, "SectionName");
编译器告诉你该怎么做。 – 2014-09-05 06:33:30
请给出一个简短但完整的例子。我不希望你必须指定类型参数。 – 2014-09-05 06:40:49
就是适合你的这个例子@Jon Skeet? – Mert 2014-09-05 06:52:50