What is the difference between POCO, code first and simple EF approach?


All these three approaches define how much control you want on your Entity frame work code. Entity framework is an OR MAPPER it generates lot of code, it creates your middle tier (Entity) and Data access layer (Context).

  • In Simple entity framework everything is auto generated and so you need the EDMX XML file as well.
  • POCO is semi-automatic so you have full control on the entity classes but then the context classes are still generated by the EDMX file.
  • In code first you have complete control on how you can create the entity and the context classes. Because you are going to manually create these classes you do not have dependency on the EDMX XML file.