如何更改 WCF 数据服务返回的实体数量限制?

发布于 2024-12-29 11:34:39 字数 65 浏览 1 评论 0原文

我注意到,无论我对 WCF 数据服务发出什么查询,我都只能返回 25 行。我如何修改客户端或服务以允许所有内容返回?

I've noticed that no matter what query I issue against a WCF Data Service, I only ever get 25 rows back. How can I modify either the client or the service to allow all to come back?

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

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

发布评论

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

评论(1

可遇━不可求 2025-01-05 11:34:39

如果您拥有该服务,那么这完全取决于您。如果您不拥有该服务并且作者希望以这种方式提供服务,则您无法更改此服务(这是很好的安全功能)。

如果您只得到 25 并且请求没有失败(并且您确定有超过 25 个),那么您还应该在响应中看到下一个链接(在最后),它指向下一个 25,依此类推。

在服务器上,这通常是通过调用 InitializeService 中的 config.SetEntitySetPageSize 方法来设置的。

If you own the service then this is totally up to you. If you don't own the service and the author wanted it this way, there's no way for you to change this (which is good, security feature).

If you get only 25 and the request doesn't fail (and you're sure there's more than 25) then you should also see a next link in the response (at the very end), which points to the next 25 and so on.

On the server this is usually setup by calling config.SetEntitySetPageSize method in the InitializeService.

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