.net 框架中的 xsd

发布于 2024-10-08 20:03:27 字数 97 浏览 0 评论 0原文

我有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情魔剑神 2024-10-15 20:03:27

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 ;-)

迟月 2024-10-15 20:03:27

我在之前的项目中使用了Xsd2Code,效果非常好。 点击此处

I used Xsd2Code in my previous project and it was pretty good. Click here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文