n this article we are going to discuss difference between Code First, Model First & Data Base First. These are the basic approaches used in Entity Framework.
Code first
Code first
- popular in hardcore programmers.
- The database is used for data only.
- Manual changes to database will be lost because your code defines the database.
- Full control by code.
- Mostly used when Database is already created.
- If you want additional features in POCO entities you must either T4 modify template or use partial classes.
- Code is auto generated..
- The developer can update the database manually.
- We can create the database model.
- Extensible through partial classes
- Manual changes to database will be most probably lost because your model defines the database.