ASP.NET 业务逻辑层

发布于 2024-12-09 01:11:22 字数 198 浏览 5 评论 0 原文

我为我的客户提供了一个业务逻辑层对象。它有很多不同的字段,大约 100 个:Id、Name 和其他字段。

我正在通过数据网格(RadGrid)检索客户。显然,在网格中我只是检索一些字段。

问题是:如果业务逻辑层对象的字段太多,即使我不在数据网格中显示所有字段,是否会减慢页面速度?您认为为我的客户创建另一个列表对象是个好主意吗?

谢谢

I have a business logic layer object for my customers. It has a lot of different fields, around 100: Id, Name, and other fields.

I'm retrieving the customers un a data grid (RadGrid). Obviously in the grid I'm just retrieving a few fields.

The question is: if the business logic layer object has too many fields, even if I don't show all of them in the data grid, is it going to slow down the page? do you think it'd be a good idea to create another object for my customers for the lists?

Thanks

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

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

发布评论

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

评论(1

在你怀里撒娇 2024-12-16 01:11:22

填充服务器端列表将花费额外的时间,但关键的考虑因素是传递到客户端的数据量,特别是数据的副本也可能进入视图状态,并且在提交表单时该数据将返回(通过视图状态)

您可以在业务对象上使用 LINQ 来减少转发的数据量,而不是创建新对象。

It wil take extra time to populate the server side list, but the key consideration is teh amount of data passed to the clinet, especially as a copy of the data will probably go into viewstate as well and when submitting the form this data will come back (through viewstate)

Rather than create a new object you could just use LINQ on you business objects to reduce the amount of data to pass forwards.

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