.net 框架中的 xsd [英] xsd in .net framework

查看:32
本文介绍了.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?

推荐答案

Xsd.exe 是您的朋友.它从您的架构生成 c# 类.这是一个捆绑在 VisualStudio 中的命令行工具:打开 Vsiaul Studio 命令提示符,然后打开 xsd.exe/?详情

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

或者,Xsd2Code 可以完成相同类型的工作,但可以更好地集成到 VisualStudio(它是一个加载项)中.您可以在 codeplex.com 上找到它

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

据我所知,您不能将 EF 与通用"xsd 架构一起使用.

As far as I know, you can't use EF with a 'generic' xsd schema.

顺便说一句,iPad 不是输入富文本答案的好工具;-)

Btw, iPad is not a great tool to type rich text answers ;-)

这篇关于.net 框架中的 xsd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆