5
I am starting some independent projects using Asp.net MVC 5 with Entity Framework, and more learning from the technology. And at the moment a great doubt arose.
I used the code generated through a connection to the database, creating an ADO.NET Entity Data Model (edmx). And it creates the object classes of the database everything. However, I needed to make some changes to the database, such as adding more tables, removing some columns and Foreing Key and adding others.
Now what? What about my code, outdated? Since I already created Controller, and views. There is how to update, or I have to make the changes all in hand?
Therefore the project should be well structured with minimal changes or increasing changes, in the specific case, update the model (EF) and then the views manually or delete and generate again your views. Changes always occur this is normal in the projects until a certain point as it is learning search more information in the site http://www.asp.net/ in the MVC part. Good Luck.
– Maria
Thank you @Maria, and just as I’m learning and going in search of finding the best way ever, I got to that point, and I didn’t know what to do, if I spawned everything again, or updated it manually, so I decided to ask and research first of all, because my project is still in the beginning, but when it needed a future change, when it was already developed enough things. I believe it would not be feasible to delete and generate everything again.
– Erico Souza
I for example @Ericosouza, only update and mute manually, because they are usually details... well I think... rs!
– Maria
Oh yes @Maria, well in my case at first seeing would also be only details, would see no harm in changing in the hand, but then I came across the thought "Oops, what if I had to change more things? And if it’s a big project and tomorrow my client wants a new functionality...", It’s okay that there would be no harm in changing in the hand, but before making any decision, I thought it best to research and ask to know the best way.
– Erico Souza