我需要将 linq 查询结果转换为列表。我尝试了以下代码:
var qry = from a in obj.tbCourses
select a;
List<course> lst = new List<course>();
lst = qry.ToList();
上述代码出现以下错误:
Cannot implicitly convert type
System.Collections.Generic.List<Datalogiclayer.tbcourse> to
System.Collections.Generic.List<course>