0

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.

1 Answer 1

1

Yes, code generation is possible using a command-line tool.
Have a look at the edmgen.exe page.

Sign up to request clarification or add additional context in comments.

3 Comments

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.
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.
Thanks for the helpful answers, you gave me multiple choices.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.