STE 作为数据合约?
有没有办法与客户端层(来自服务器层,即 WCF)共享自我跟踪实体,例如数据契约。
我的意思是,不要将任何带有 STE 的程序集包含到客户端,只需从服务器获取它们,例如
如果“DAL”是服务引用,我想要一些类似的内容:
DAL.SomeEntity = new DAL.SomeEntity();
Is there any way to share self tracking entities with client tier(from server tier which is WCF) like Data Contract.
I mean, do not include any assembly with STE to client, just get them from server e.g.
If "DAL" is the service reference, I want some like:
DAL.SomeEntity = new DAL.SomeEntity();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
自跟踪实体必须以代码或程序集的形式与客户共享。这是使用它们的主要要求,因为它们不仅仅是一个合约,它们还包含负责更改跟踪的逻辑,并且该逻辑不能以任何其他形式与客户端共享。
Self tracking entities must be shared with client in form of code or assembly. That is the main requirement to use them because they are not just a contract they also contain logic responsible for change tracking and this logic cannot be shared with the client in any other form.