How to sync model after using Code First from Database using Entity Framework 6.1 and MVC 5?

asp.net-mvc-5 c# ef-code-first ef-database-first entity-framework-6

Question

Assumptions

  • using C#, MVC 5, VS 2013, and EF 6.1

  • It's crucial to constantly update the database model I already have for SQL Server that was created in Toad DM.

Notes and Steps

  1. I selected First Code from Database (fresh function in EF 6.1) to generate the models using the ADO.NET Entity Data Model. Observation: Model classes and DbContext class successfully generated, although No.edmx or.tt files were produced..

  2. Then I created a new scaffold item: Entity Framework-based MVC 5 Controllers with views. Note: Successful creation of controllers and views.

Question

I no longer wish to update my database using Code First. I would prefer that the models be updated in response to database changes. What will we do next? Will I be unable to update my model classes from the database without an edmx file?

1
59
9/16/2016 8:45:25 PM

Popular Answer

ZZZ_tmp
52
8/31/2017 10:41:27 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow