Error: “The specified LINQ expression contains references to queries that are associated with different contexts”

后端 未结 3 1194
眼角桃花
眼角桃花 2020-11-27 17:26

I am receiving the error shown in the title from a LINQ query that includes two tables from two different edmx files. Here is the query:

var query = (from a          


        
3条回答
  •  生来不讨喜
    2020-11-27 17:47

    You either need to add the second table to the model of the first context. If this is in multiple databases, you need to do the secondary lookup client-side using a Linq to Objects join.

提交回复
热议问题