I am one of those older developers who remember the database-first approach. I also used LINQ back in the day to load my POCO objects. Then, in stepped Entity Framework, to which I was like "hey this is awesome". Then, in steps the concept of code-first, which left me going "why?" But, I decided to give it a go and it was a great learning experience, as I found my code to be more testable as I could mock the data object, but quickly learned that updating the data model in future releases was troublesome. I then learned that migrations were one of the most important things to understand in order to be truly successful with code-first. But, one of the biggest gains was I did not need to couple to a repository ...
Let's talk about data storage
Get Hands-On Cloud Solutions with Azure now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.