我遇到了这样的错误:指定的LINQ表达式包含与不同上下文相关联的查询的引用。
任何解决方案吗? 谢谢!
var employee = new ApplicationDbContext().Employee;
var otherTable = new OtherDbContext().OtherTable;
var returnValue = (from e in employee
join o in otherTable on e.Id equals o.Id
select new
{
e.Name,
e.Address,
o.Others
});
任何解决方案吗? 谢谢!