1

In Entity Framework, I always use the Update module from Database option, but It's not covering all kind of updates, sometimes it's more easier to delete the EF and add it back than fixing and verifying whether this option reflected the updates or not,

In my current project i have added a Self-Join relation and then i used the Update module from Database option, but it didn't update it correctly,

I can find that table and the new relation in the Module diagram but in the code behind it's not reflecting the update correctly, This time i have my custom changes on the EF? It is not possible to delete and add again this time, My question is:

Is there any reliable and easy way to update the EF from DB without using third party tools?

1 Answer 1

1

After clicking the Update module from Database , Two clicks are needed, orderly:

  1. Right Click on the .tt file and choose Run Custom Tool. Wait Until is Finished.
  2. Right Click on the .Context.tt file and choose Run Custom Tool. Wait Until is Finished.

I used this method in Visual Studio 2012 for many scenarios and it's updating fine with no errors.

Hope this helps.

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

1 Comment

Any idea what Run Custom Tool does??

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.