RIA Silverlight 项目中域服务类的最佳实践

发布于 2024-08-07 19:04:10 字数 149 浏览 5 评论 0原文

我想问一下,在单个域服务类中保存业务对象的 CRUD 操作是否是一个好的做法。我们是否应该为每个 BO 提供一个域服务类?

产品域服务.cs 客户域服务.cs ...

或单个

BusinessObjectDomainService.cs

I would like to ask whether or not is a good practice, to hold the CRUD operations for business objects, in a single domain service class. Should we provide a domain service class for each BO?

ProductDomainService.cs
CustomerDomainService.cs
...

or a single

BusinessObjectDomainService.cs

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

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

发布评论

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

评论(1

白首有我共你 2024-08-14 19:04:10

我选择了单个域对象,因为我的模型并不那么复杂。我认为将域服务聚集在一起可能会更好,即用户服务日志服务。对于每个业务对象,这种逻辑聚集比 1 更好。

I went with a single domain object beause my model is not that complex. I would think it might be better to cluster the domain services together ie user services logging services. That kind of logical clumping would be better than 1 for each business object.

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