What are the advantages/disadvantages of Code First Approach?

Technology CommunityCategory: Entity FrameworkWhat are the advantages/disadvantages of Code First Approach?
VietMX Staff asked 3 years ago

Advantages:

  • Based on business objects we can decide the database structure.
  • We can decide which classes need to be serialized and can specify the collection to eager load.
  • Good for smaller applications.

Disadvantages:

  • All database related stuffs should be included in the code.
  • For Stored Procs, we need to use the Fluent APIs to write it in code.
  • Not good for data intensive applications.