Reputation: 11
I have little experience with entity framework. I have been given an ASP.net web application and it has a database which written in entity frameworks and it runs in the person local computer. I would like to create a new database which contains all of the information (tables, data, etc) inside the database.
i have tried to change the connection string to my localDB but i have no idea on how to create the tables inside my localdb.
i have tried to search for a way but it does not give the answer that i am looking for. Can anybody help me with this problem or maybe someone can direct me to the solution which are already there for my problem?
Thank you
Upvotes: 1
Views: 1221
Reputation: 101
First Change the "Catalog=DBName" in connection string ,
then open package manager console type command update-database, press enter. It may help you creating new database.
If it will show the error regarding migration.
Write command add-migration press enter, then provide a name to the migration.
Now again write command update-database and wait for the success message until seed is running.
Upvotes: 1