7

Now I'm using EF 6 database first in my solution , I have entities that pre-defined in the database. I now need to update the database and add tables !

I can't find the true way to follow

2 Answers 2

11

Open the edmx file and on a black space right click and use Update Model From Database...

enter image description here

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

2 Comments

using this solution , i must create the database table at the end-user with SQL Syntax i think ! have you other way to get migrations ?
@MedMANS As you said you are trying database first, I thought the table already exist. In this case I think you may want to try making the table here in the model (edmx file) and try using Generate Database from Model.
1

This is an alternative and the result is also much cleaner imo, you can also delete the .edmx file completely and remove the database connection string from you projects .config file. Then repeat the process of adding a new edmx file.

1 Comment

i woul get migrations at the end user also !

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.