AspBucket offers ASP.NET, C#, VB, Jquery, CSS, Ajax, SQL tutorials. It is the best place for programmers to learn

Monday 5 October 2015

Difference between Code first, Model first & Database first

In 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

  • 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.

Database first

  • 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.

Model first

  • 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.


Post a Comment

  • Popular Posts
  • Comments