xsd in .net framework

你说的曾经没有我的故事 提交于 2020-01-07 08:47:07

问题


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?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/4503635/xsd-in-net-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!