在 Silverlight MVVM RIA 服务应用程序中放置业务规则的最佳位置是哪里?

发布于 2024-07-18 17:55:21 字数 185 浏览 7 评论 0原文

在 RIA Silverlight 应用程序中放置业务规则的最佳位置是哪里?

我认为域服务将是一个好地方,除了它似乎只与客户端层共享数据。 我认为 ViewModel 不是一个好主意,因为我们应该在服务器层中拥有业务规则。

在共享代码中? *.shared.cs?

您将业务规则放在哪里?

Where is the best place to put business rules in an RIA Silverlight application?

I thought the Domain Service would be a good spot except it seems to only share Data to the client tier. I don't think the ViewModel is a good idea since we should have Business Rules in the server tier.

In shared code? *.shared.cs?

Where do you put your business rules?

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

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

发布评论

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

评论(2

攒一口袋星星 2024-07-25 17:55:21

对于 RIA 服务,您的业务逻辑应该位于域服务中。

您能举个例子说明这对您来说是一个什么问题吗?

编辑:查看本文档的第 3.3 节:
http://下载。 microsoft.com/download/F/B/8/FB8CA635-296B-487F-965C-8148F08B5319/riaservicesoverviewpreview.pdf

For RIA Services, your business logic is supposed to be in the Domain Service.

Can you give an example on how this is a problem for you?

EDIT: Look at the section 3.3 of this doc:
http://download.microsoft.com/download/F/B/8/FB8CA635-296B-487F-965C-8148F08B5319/riaservicesoverviewpreview.pdf

彼岸花ソ最美的依靠 2024-07-25 17:55:21

您是否尝试过扩展 EF 部分类? EF 类的属性在客户端和服务器上均可用。 我不确定这是否是“正确”的做事方式。

Have you tried extending the EF partial classes? Properties on the EF classes are available on both the client and the server. I'm not sure if this is the "right" way to do things though.

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