【发布时间】:2010-10-08 18:14:44
【问题描述】:
我不能使用ToList<Tresult>() 扩展方法。我使用的代码是,
return this.Semesters.ToList<ISemester>()
上面代码中的“学期”是一个实体集合。 这些 using 指令已经存在,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
我仍然无法编译,因为它一直在抱怨
System.Data.Objects.DataClasses.EntityCollection<Semester> 不包含 'ToList' 的定义,并且最佳扩展方法重载 System.Linq.ParallelEnumerable.ToList<TSource>(System.Linq.ParallelQuery<TSource>) 有一些无效参数
【问题讨论】:
标签: c# frameworks entity