I have a WCF Data Service service that uses Entity Framework to provide data. When the database changes, I have to use the EDMX editor of Visual Studio to call Update from database to match the data classes.
Is it possible to call a csc compiling together with an update from the database first? I'd like to avoid the dependency of using VS.
Add a comment
|
1 Answer
Yes, code generation is possible using a command-line tool.
Have a look at the edmgen.exe page.
3 Comments
Nestor
It is close to what I'm looking for, but it has limitations (can't specify tables) and says nothing about updating, only generating. A conceptual model generated by EdmGen.exe includes all the objects in the database. If you want to generate a conceptual model that includes only specific objects, use the Entity Data Model Wizard. For more information, see How to: Use the Entity Data Model Wizard.
MaxSC
I see. Searching a bit, i saw another tool called edmgen2.exe that performs other things, have look here but it might be out of date. Another option would be to create your own T4 file that you could launch with
TextTransform.exe. It would be able to take a table list as parameter and edit the EDMX file using Linq2SQL.Nestor
Thanks for the helpful answers, you gave me multiple choices.