当前位置:网站首页>Error: the specified LINQ expression contains a reference to a query associated with a different context
Error: the specified LINQ expression contains a reference to a query associated with a different context
2022-06-26 07:17:00 【javail】
problem :
I am receiving the error shown in the title from a LINQ query that includes two tables from two different edmx files. I received LINQ Error displayed in query title , The query includes data from two different edmx Two tables of the file .Here is the query: This is a query :
var query = (from a in db1.Table1 join b in db1.Table2 on a.Id equals b.Id orderby a.Status where b.Id == 1 && a.Status == "new" select new { Id = a.Id, CompanyId = (from c in db2.Company where s.Id == a.Id select new { c.CompanyId }) });db1 and db2 are contexts that are associated with two different edmx files.db1 and db2 Is different from two edmx Context associated with the file .How can I overcome this error? How can I overcome this mistake ?
Solution :
Reference resources : https://stackoom.com/en/question/Ulcu边栏推荐
- [image fusion] multimodal medical image fusion based on coupled feature learning with matlab code
- Crosslinked porphyrin based polyimide ppbpi-2, ppbpi-1-cr and ppbpi-2-cr; Porous porphyrin based hyperbranched polyimide (ppbpi-1, ppbpi-2) supplied by Qiyue
- Which of the top ten securities companies has the lowest commission fee and is the most safe and reliable?
- This paper analyzes the use method and implementation principle of eventbus event bus
- Market survey of China's coal to liquid industry and analysis report on investment competitiveness during the "14th five year plan" 2022-2027
- [recommend 10 easy idea plug-ins with less tedious and repetitive code]
- 十大证券公司哪个佣金手续费最低,最安全可靠?
- [image fusion] MRI-CT image fusion based on gradient energy, local energy and PCA fusion rules with matlab code
- How to convert Unicode into Chinese characters in Excel
- SQL
猜你喜欢
![[recommend 10 easy idea plug-ins with less tedious and repetitive code]](/img/74/69ca02e3d83404f7b0df07c308a59d.png)
[recommend 10 easy idea plug-ins with less tedious and repetitive code]

i3wm 获取window class

How to convert Unicode into Chinese characters in Excel

In depth analysis of redis object structure

Paths with a certain value in a binary tree (1) (2) (3) (Sword finger offer)

Dark red crystal meso-5,10,15,20-tetra (p-aminophenyl) cobalt porphyrin (co TAPP); Meso-5,10,15,20-tetra (p-aminophenyl) cobalt porphyrin no complex (TAPP co no) supplied by Qiyue

Porphyrin based polyimide (ppbpis); Synthesis of crosslinked porphyrin based polyimides (ppbpi CRS) porphyrin products supplied by Qiyue biology

When asked during the interview, can redis master-slave copy not answer? These 13 pictures let you understand thoroughly

Procedure macros in rust
![[recommend an entity class conversion tool mapstruct, which is powerful and easy to use]](/img/7b/43becce42192fb5e0469465aa27a36.png)
[recommend an entity class conversion tool mapstruct, which is powerful and easy to use]
随机推荐
Introduction to mapping in ES
Porphyrin based polyimide ppbpis (ppbpi-pa, ppbpi-pepa and ppbpi-pena); Crosslinked porphyrin based polyimide (ppbpi-pa-cr, ppbpi-pepa-cr, ppbpi-pena-cr) reagent
专业课-代码题记录
职场“大冤种”,不仅身累,心也被掏空……
MATLAB线性规划模型学习笔记
systemctl php配置文件
How to publish function computing (FC) through cloud effect
A bold sounding and awesome operation - remake a Netflix
Development trends and prospects of acrylamide crystallization market in the world and China 2022-2027
ZRaQnHYDAe
ES cluster_ block_ exception read_ only_ allow_ Delete question
Numpy learning challenge level 1 - Download and installation of numpy
[image detection] image target size measurement system based on morphology with matlab code
一文搞懂Glide,不懂来打我
Recognize pnpm: faster, higher performance NPM
面试被问Redis主从复制不会答?这13张图让你彻底弄明白
SQL
一文深入底层分析Redis对象结构
Tetradecanoxy tetraphenylporphyrin methacrylate mm-tpp-14c; Cetanoxy tetraphenyl porphyrin methacrylate mm-tpp-16c; Purple solid; Qiyue supply
Massive log collection tool flume