How to create EDMX from CSDL+SSDL+MSL files?

.net edmgen edmx entity-framework-6


I am using EdmGen.exe to automatically generate files:

  • Database.cs
  • Views.cs
  • Concept.csdl
  • Storage.ssdl
  • Mapping.msl

How can I generate an EDMX file from all that, so I can include it into my Visual Studio project?

I'm trying to automate EDMX update in such a way that would not require use of Visual Studio IDE, i.e. completely from command line.


My development team needs to start using a huge Oracle database, which was designed long ago, and undergoes small, non-frequent changes. ODP Entity Framework from Oracle seems to be a very good platform for the job, but their Visual Studio Integration Tools comes as a disaster, which we are trying to avoid like a plague. I was asked to script automatic EF model generation completely from command line. Generating a new EDMX from CSDL+SSDL+MSL files is where I got stuck.

7/30/2015 7:38:13 PM

Popular Answer

What you want is far out of left field for EF. I'm pretty sure you're going to have to write some custom tooling as the EDMX generation isn't something I see Visual Studio calling into making me think it's part of the IDE itself.

A couple resources I found on this:

Looking at an EDMX I have locally, it's basically just a logical mashup of those files you already have generated so you should be able to figure out and write a generator without too much hassle. Granted, it'll be tedious as hell.

Bottom line, I just don't think there's a tool to do this for you given the typical EF development strategies of code-first or database-first approaches. The prescribed approached here would be code-first but I totally get why you don't want to recreate them.

That said, unless you absolutely need an EDMX for some reason (visualization, or something), I would actually just template out your models and do a pseudo "code first" approach and not even worry about the EDMX tool chain.

Best of luck.

7/30/2015 8:22:20 PM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow