在 Silverlight MVVM RIA 服务应用程序中放置业务规则的最佳位置是哪里?
在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于 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
您是否尝试过扩展 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.