Answered by:
Mapping EDMX to XML File instead of Database

Question
-
Hi,
I have an XML file, as an input, which I want to work on as an entity within my project.
In .NET 2.0, I used to generate a dataset from the XML's schema, and then managed to work with the content as Objects, something refered to as ORM.
My question, is there any alternative to adapt this approach in Entity Framewok, so that the EDMX will be generated from my XSD, instaed of a database. I tried the Empty Model option, but it seems to be merely for late databae binidng.
Thanks
Mustafa Al-Durra, B.Sc Computer Engineering, MCP, MCDBA, MCAD.NET, SoftHealth Inc. (President/CEO)Saturday, August 14, 2010 3:35 PM
Answers
-
Hello,
Welcome to EF forum!
I once answered a similar question of yours here, http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/010138b3-e0a0-40dc-8cf1-1e4cd8ab775d. In that thread, I provided some related references and potential workarounds.
But we do not have such a tool in VS or .NET Framework to make the conversion automatically. Maybe you can send a suggestion at Microsoft Connect to report it to the product team directly. J
Good day!
Best Regards,
Lingzhi SunMSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Proposed as answer by Mike Paterson Wednesday, August 18, 2010 7:35 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Thursday, August 26, 2010 1:12 AM
Tuesday, August 17, 2010 9:44 AM
All replies
-
You can try Linq to Xsd: http://linqtoxsd.codeplex.com/Saturday, August 14, 2010 6:12 PM
-
Thanks Mike,
but indeed, I am looking for an EDMX approach with all Entity Framewokr features. Linq is a nice querying paradigm, but will neither map nor generate the entities.
My guessing is that, this feature is yet to be seen in ADO EDMX. Let's hope!.
Mustafa
Mustafa Al-Durra, B.Sc Computer Engineering, MCP, MCDBA, MCAD.NET, SoftHealth Inc. (President/CEO)Sunday, August 15, 2010 5:06 PM -
Hello,
Welcome to EF forum!
I once answered a similar question of yours here, http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/010138b3-e0a0-40dc-8cf1-1e4cd8ab775d. In that thread, I provided some related references and potential workarounds.
But we do not have such a tool in VS or .NET Framework to make the conversion automatically. Maybe you can send a suggestion at Microsoft Connect to report it to the product team directly. J
Good day!
Best Regards,
Lingzhi SunMSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Proposed as answer by Mike Paterson Wednesday, August 18, 2010 7:35 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Thursday, August 26, 2010 1:12 AM
Tuesday, August 17, 2010 9:44 AM -
Hi,
I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?
If you need further assistance, please feel free to let me know. I will be more than happy to be of assistance.
Have a nice day!
Best Regards,
Lingzhi SunMSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.Monday, August 23, 2010 1:32 AM -
Hi Lingzhi,
Thanks for your reply. But, in my case, there is no database, and will not be. I am dealing with XML files of a defined schema (XSD). These file are not to be save in my application, rather just parsed, processed and passed by without any kind of persisting for privacy issues.
My legacy way of doing it, is to generate entity class from the XSD. And then load the entity with XML File. This is just to enable objected oriented apporach rather than parsing the xml with extensive Xpath queries.
As for EF, it will be something like: XSD -> EDMX transfromation and at run time the EDMX should be populated from XML file and note database tables.
Thanks
Mustafa
Mustafa Al-Durra, B.Sc Computer Engineering, MCP, MCDBA, MCAD.NET, SoftHealth Inc. (President/CEO)Saturday, August 28, 2010 6:34 PM