我不能使用ToList<Tresult>()
扩展方法。我使用的代码是Collection.ToList <TResult>()扩展方法引发编译时错误
return this.Semesters.ToList<ISemester>()
上述代码中的'上学期'是一个EntityCollection。 这些使用指令已经存在,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
我仍然不能编译,因为它不断complainting是 System.Data.Objects.DataClasses.EntityCollection<Semester>
不包含“ToList”和最佳推广方法重载System.Linq.ParallelEnumerable.ToList<TSource>(System.Linq.ParallelQuery<TSource>)
的定义有一些无效参数
糟糕!是的,我的错!学期实施了不同的界面。但是,这个错误是误导性的。 – 2010-10-08 18:28:59