我不能使用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