mvc entity framework

i just take over a mvc with entity framework project and the developer is gone.
Now I added a column in the database table, and how can i refresh the entity framework so I can continue to code with linq...?

I am not expert with any projects that using entity framework. hope you can help out.

Thanks
LVL 1
ITsolutionWizardAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Snarf0001Commented:
It depends on whether the EF was created as database-first or code-first.
Given what you said, and assuming it was code-first, open the .edmx, right click and hit "Update Model from Database".  You can check off any new tables you want to add, but by default any existing tables will be updated with new / removed columns.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shaun VermaakTechnical SpecialistCommented:
That is database-first. Just make a backup of your models in case the previous developer added code into the autogenerated classes
update.png
Jose Gabriel Ortega CastroEE Solution Guide/Topic Advisor and CEO Faru Bonon ITCommented:
Go to the Powershell console.
Open VS and navigate to Tools/Package Manager Console
Then run Enable-Migrations (if you got an error, your developer already did this)

if the enable-migrations cmdlet works or fail you should create a new migration (from old DB to new)
add-migration UpdatedCoumnXXXX

you should review the code proposed and if you accept it just run

Update-database

and that's it.

This is if you added the column programmatically if you did it on the DB follow the previous suggestion from  @Shaun Vermaak

Documentation in here: https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/migrations-and-deployment-with-the-entity-framework-in-an-asp-net-mvc-application
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET MVC

From novice to tech pro — start learning today.