Skip to content

8. Conclusion

In this document, we first explored Entity Framework 5 Code First (EF 5). Then we ported the following application, which used ORM and NHibernate,

to the following architecture, which uses ORM and EF 5:

We built this latest architecture with five SGBD. While portability between SGBD was not always 100%, it was nonetheless extremely satisfactory.

We learned a few principles:

  • all SGBD instances studied have a solution for automatically generating primary key values;
  • to manage concurrent access to database entities, it appears that an integer column automatically incremented by triggers is a solution accepted by all;
  • when in Lazy Loading mode, it is important for entities to encapsulate the foreign key values associated with them. This then allows the entity’s dependencies to be retrieved from the database.