Question

I'm doing a system as my final year project, in university. My team members have different views on the development approach to use.

Does code first have more advantages than database first?

We'll be using mvc5 and will be deploying on azure. Any feedback would be appreciated.

Was it helpful?

Solution

[Code-first vs Model/Database-first

This is for an older version but still valid.

We use code first but ultimately its an approach and you will find as many people for one as another. At University I was taught to design the database first as that was the methodology used to help structure it correctly and make you think through it. Now we use Code First but I approach things very differently to the Uni years as I have so much more experience. Its still EF at the Core so go with what complements your skills and maybe how you have been/are bring taught.

OTHER TIPS

I would argue for database first. Why? Well, if somebody is designing the data model they are more likely to encode that model in the database.

If you opted for code first you will be modeling the domain (optimally) and then creating the database based upon conventions in the framework.

Once you have created the database you are back in first camp. Once it exists you will use code to access the data and not recreate your data model in the database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top