Tuesday, August 24, 2010

One Solution To The Fluent NHibernate Error "The given key was not present in the dictionary."

Problem:
You have set up some mappings and you get the following Fluent NHibernate error - "The given key was not present in the dictionary."

Solution:
This error can be generated for multiple reasons. One of the reasons is that you forget to map an entity. Before you go any further, check that you have mapped EVERY entity and check that you have registered every entity if you are using something like StructureMap or any other IOC.

Smooches,

Kila

No comments: