N层实体框架没有结果但没有错误 [英] No results yet no error with N-Tier Entity Framework

查看:238
本文介绍了N层实体框架没有结果但没有错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用N-Tier实体框架VS2012创建了一个演示项目。

I have created a demo project using the N-Tier Entity Framework VS2012.

问题是没有返回的结果没有我要求的结果。

the problem is that there are no results returned no mather what i request.

没有抛出检测到的错误吗?

No Errors are thrown of detected?

这里有任何建议吗?

推荐答案

请确保调用AsQueriable()方法从后端请求数据。

Make sure to call the AsQueriable() method for requesting data from the backend.

N层实体框架支持本地和远程查询。虽然 context.Orders.ToList()仅返回客户端内存中已经存在的内容,您可以调用 context.Orders。 AsQueriable() .ToList()以便使查询在服务器上执行。

N-Tier Entity Framework supports both, local and remote queries. While e.g. context.Orders.ToList() only returns what’s already in client memory, you can call context.Orders.AsQueriable().ToList() to make the query to be executed on the server.

您可能还希望查阅位于 http://ntieref.codeplex.com/ 以获得一些逐步指导。

You may also want to consult the framework’s user guide found at http://ntieref.codeplex.com/ for some step-by-step guidance.

这篇关于N层实体框架没有结果但没有错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆