使用数据注释在WCF服务边界上对EF生成的类进行验证 [英] Using data annotations for validation on EF-generated classes across WCF service boundary
问题描述
似乎"伙伴类"上的数据注释。当域对象通过WCF服务传递时,与EF生成的域类相关联的数据不会通过网络发送。有没有办法解决这个问题,这样我仍然可以在定义实体属性的数据验证时使用DRY(不要
重复自己)原则,同时通过WCF服务使用这些实体?我没有使用WCF数据服务。
Bob
嗨Bob,
我正在调查你的问题。 我会尽快回复。
谢谢,
Cathy Miller
Microsoft在线社区支持
It appears that data annotations on "buddy classes" associated with EF-generated domain classes do not get sent over the wire when the domain objects are passed through a WCF service. Is there any way to work around this so that I can still use the DRY (Don't Repeat Yourself) principle in defining data validations on entity properties, while using those entities through a WCF service? I am not using WCF Data Services.
Bob
Hi Bob,
I am looking into your question. I will respond as soon as possible.
Thanks,
Cathy Miller
Microsoft Online Community Support
这篇关于使用数据注释在WCF服务边界上对EF生成的类进行验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!