Author: TFarrell | Posted on: 1/20/2009 7:15:51 PM | Views : 313

I would like to hear comments and suggestions on the proper way to avoid circular references between projects.Consider an app with the following assemblies:- UI- BusinessLogic- DAL- CommonSo typically, the dependencies would look like this:UI >> BusinessLogic >> DAL and all 3 above depend on CommonSo
far, so good, but... lets say that I have a common collection of data
that is required to be used in all 3 of the main assemblies, such as a
list of supported cultures.So I create a static helper class in
the Common assembly and this gives me access to the shared singleton
collection from all 3 main assemblies.However, to populate that
singleton collection when the app starts, I need to hit the database
once. To do this right, I would load the collection from the database
using my BusinessLogic layer. But I cannot do this because doing so would cause a circular reference between Common and BusinessLogic.
Go to the complete details ...