I want to generate an xml file(based on the database) from my asp.net mvc 2 application as an import for another application ie winforms app.
The approach is:
-generate a domain model based on the database with entity framework 4
-create views based on this model
-serialize the formdata in the controller to generate xml file
questions are:
-do i need to generate an xsd file in this case to import this xmlfile into the winform app?
-do i need xslt to import it into the winform app?
Not necessarily. You can recreate the same class in your WinForms application and deserialize the XML back to it. You just need to share the instance of the model between the MVC and the WinForms application. Autogenerated EF models are probably not the best solution in this case. I would probably use some other POCO model and have both applications share this model class. If you don’t want to share assemblies between the two applications, given an XML instance you could generate its corresponding class using the xsd.exe utility.
No.