.net 框架中的 xsd
我有 xsd 文件。我想从这个模式生成我的实体模型并序列化和反序列化。推荐的 .net 框架和 C# 方法是什么?我从java认识了JAXB。我可以使用实体框架吗?还有其他框架吗?
I have xsd file. I want to generate my entity model from this schema and serialize and deserialize. What is the recomanded .net framework and C# way to do so? I know JAXB from java. Can I use entity framework? is there another framework?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Xsd.exe 是你的朋友。它从您的架构生成 C# 类。它是一个捆绑到 VisualStudio 中的命令行工具:打开 Vsiaul Studio 命令提示符,然后打开 xsd.exe /?有关详细信息
或者,Xsd2Code 执行相同类型的工作,但可以更好地集成到 VisualStudio(它是一个加载项)中。您可以在 codeplex.com 上找到它
。据我所知,您不能将 EF 与“通用”xsd 架构一起使用。
顺便说一句,iPad 并不是输入富文本答案的好工具;-)
Xsd.exe is your friend. It generates c# classes from your schema. It's a command-line tool bundled into VisualStudio: open a Vsiaul Studio command prompt, then xsd.exe /? for details
Alternately, Xsd2Code does the same kind of job but integrates better into VisualStudio (it's an add-in). You'll find it on codeplex.com
As far as I know, you can't use EF with a 'generic' xsd schema.
Btw, iPad is not a great tool to type rich text answers ;-)
我在之前的项目中使用了Xsd2Code,效果非常好。 点击此处
I used Xsd2Code in my previous project and it was pretty good. Click here