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 the NHibernate ORM:

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

We built this latter architecture using five DBMSs. While portability between DBMSs was not always 100%, it was nonetheless extremely satisfactory.

We learned a few principles:

  • all DBMSs 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 that entities encapsulate the foreign key values associated with them. This then allows the entity’s dependencies to be retrieved from the database.