保留对自动生成的 WCF RIA 服务域类的更改
在创建基于实体框架的自动生成的 WCF 域服务类期间,还会创建一个包含 EF 类的元数据的文件。在此文件中,我必须将 [Include()] 属性添加到许多类,以便我可以在 WCF 调用期间包含这些属性。我的问题是,有时我必须更改数据模型。这要求我删除整个元数据文件以及域服务文件,并重新生成整个文件,然后返回并将 [Include()] 属性添加回正确的属性。有更好的方法吗?有没有办法将 [Ininclude()] 属性保存在单独的文件中,这样我就不必不断返回并将它们添加进去?
During the creation of an auto-generated WCF domain service class based off entity framework, a file that contains the metadata for the EF classes is also created. In this file, I've had to add the [Include()] attribute to a number of classes so that I can include these properties during WCF calls. My problem is, I sometimes have to changed the data model. This requires that I remove the entire metadata file along with the domain services file, and regenerate the entire thing and then go back and add the [Include()] attributes back to the correct properties. Is there a better way to do this? Is there a way to keep the [Include()] attributes in a separate file so that I don't have to continuously go back and add them in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论