linq查询和ado实体框架+Visual Studio 2010

发布于 2024-10-04 00:17:30 字数 76 浏览 9 评论 0原文

我使用了 ado 实体数据模型并将其添加到我的 Web 应用程序中。当我想调试的时候 使用断点,我看不到查询的数据,只能看到对模型的引用。

I used an ado entity data model and added it to my web application. When I want to debug
with breakpoints, I can't see the data of the query, only a reference to the model.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紧拥背影 2024-10-11 00:17:30

如果您没有通过迭代结果来执行查询(例如使用foreachToList),那么这是预期的。

所做的只是

var query = from e in db.SomeTable
             select e;

设置最终可以执行并生成查询结果的代码,但直到您如上所述迭代 query 时才会生成结果。

除此之外,你没有给我们太多的帮助。

If you haven't executed the query by iterating over the results (e.g. using foreach or ToList) then this is expected.

All that

var query = from e in db.SomeTable
             select e;

does is set up code that can eventually be executed and produce the results of the query but it doesn't produce the results until you iterate over query as above.

Beyond that, you haven't given us much to go on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文