我希望有人可以帮助我在**list = g.ToList();**
添加**var g = s.GroupBy(u => u.famille);**
错误时添加 GROUPBY ,如果有人帮助我如何解决错误。
这是我在广告行时出现的错误消息:你不能隐含转换类型System.collections.Generic.list>到System.collections.Generic.list>
public List<famille> Getlistfournisseur()
{
familleEntities db = new familleEntities();
List<famille> list = new List<famille>();
var s = db.famille.Where(x => x.famille!= "").OrderByDescending(x => x.famille);
var g = s.GroupBy(u => u.article);
list = g.ToList();
return list;
}