I’m trying to use code first model for my simple blog site, I’m used to with database first, but an experienced guy told me to use code first, but I’m having lots of trouble to implement this, even the simplest thing like setting identity to the key value, defining relation between two entity, handling image type data. I do want to understand the inside out of this approach, I tried to search quite a lot, but didn’t get the desired information. Can someone please help me with the information like where to start, how to proceed & get expertize on the code first model?
Thanks in advance.
Check out this: Entity Framework Code First to Database on MSDN.
Even better, the tutorial uses a Blog as the example application.