Two things are therein mind while choosing the workflow.
Things that are outside our control:
New database/Existing Database:
Thing that are inside our control:
Creating model using design or writing code.
- Create model in designer.
- Generate DB from the model.
- Classes that are going to interact auto generated from model.
- Reverse engineer model in designer.
- Classes are auto-generated from Model.
Code First (New Database) —
- Find my model in code. Model is made up of main classes that are going to interact with the application. Optionally can provide the code for mapping and configuration.
- Database is created from the model.
- If I can my model, then can use the Code First Model to evolve database.
Code First (Existing Database) —
- Define classes and mapping in code.
- Reverse engineering tools are available.