Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add new table to an existing database using database first approach EF

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

like image 327
Med MANS Avatar asked Jun 05 '15 09:06

Med MANS


2 Answers

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

enter image description here

like image 191
Hossein Narimani Rad Avatar answered Sep 28 '22 08:09

Hossein Narimani Rad


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.

like image 30
Bhargav Avatar answered Sep 28 '22 06:09

Bhargav