ling join 报错The specified LINQ expression contains references to queries that are associated with different cont

The specified LINQ expression contains references to queries that are associated with different cont。

解决方法:

查询源的最后添加.ToList();

一定是哪里转换成了IEnumerable或其他东东了ToList 就好了!

原文地址:https://www.cnblogs.com/huangyoum/p/4548515.html