本文介绍了错误:v6.1.3(& v6.1.2):延迟LINQ执行(/多语句)错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Guys& Gals,除非我不理解EF工作/应该如何工作的微妙之处,当你在单独的C#-statements中分解LINQ查询时,你似乎有v6.1.3的错误;例如这是有效的:
$


            var fullQry =

                dbCtx.BldAs.AsNoTracking()。ToList();

Guys & Gals, unless I don't understand a subtlety of how EF works/should work, you seem to have a bug with v6.1.3, when breaking-up LINQ queries across separate C#-statements; e.g. this works:

            var fullQry =
                dbCtx.BldAs.AsNoTracking().ToList();

但这会引发异常:



But this throws an exception:

            var qry =

                (IQueryable< BldA>)dbCtx.BldAs;
            var qry =
                (IQueryable<BldA>)dbCtx.BldAs;

推荐答案

根据您的描述,我遇到类似问题,似乎是一个实体框架6.1.3问题,我可以建议你可以将你的实体框架版本升级到6.2.0。这是实体框架中最重要的变化
6.2.0。

According to your description, I have encounter the similar issue, it seems that is a entity framework 6.1.3 issue, I could suggest that you could upgrade your entity framework version to 6.2.0. Here is the most important changes in entity framework 6.2.0.

此外,实体框架一直是开源的。您可以从以下链接查看相关的源代码。

In addition, entity framework have been open source. you could check related source code from the following link.

祝你好运,

张龙


这篇关于错误:v6.1.3(&amp; v6.1.2):延迟LINQ执行(/多语句)错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 20:16