ADO.Net Entity Framework generate model from XSD file

风流意气都作罢 提交于 2020-01-04 02:41:32

问题


I have a rather large XSD file and I have heard that it is possible using the entity framework to connect to XML files like databases and validate them against the XSD, however I do not know how to go about doing this.

So what I'm trying to do is generate a entity framework model from my XSD file, and I imagine this will generate a series of objects which will be used when opening a XML file for validation and population.


回答1:


Linq2xsd will do that. http://linqtoxsd.codeplex.com/ once dead it now lives on codeplex.




回答2:


As well you can try to use latest (4.5) version of XML Schema Definition Tool

xsd.exe /d /eld "your_schema.xsd"

where /eld option enable you to use LINQ to DataSet



来源:https://stackoverflow.com/questions/5546015/ado-net-entity-framework-generate-model-from-xsd-file

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