Unha Back
Unha Back

Reputation: 21

Using EF core power tools, Need Update model and table to add Column

I am using asp.net WebAPI and I created models by EF core power tools. So, there is a Context file in Model folder.

Actually, I wanna add column in existing table, so I need to change the model as well. How can I do that? In EF Core tools, there is no option to update the model and table. I already added the column in the database.

Upvotes: 0

Views: 6649

Answers (1)

Ergin Çelik
Ergin Çelik

Reputation: 775

You can use to reload the model

enter image description here

you can run the tool again. you can not see all tables in your DB.

enter image description here

Your tables have to has a primary key (because of EF-core use only that tables have a primary key)

enter image description here

Upvotes: 2

Related Questions