I'm trying to create a test application that shows event dependencies: i.e. a resulting dependency graph (as opposed to just a tree graph). Something like:
public class Event() {
public virtual int Id {get;set;}
public virtual IList<Event> Dependencies {get;set;}
}
The other requirement is that I be able to traverse the graph in both directions: given any one event, I can access its dependencies as well as its prerequisites using Nhibernate.
Many events can be dependent on one event occuring... but also any given event may depend on many other events. What should the model look like (or does this require more than one model)? How can it be mapped using Fluent NHibernate? And is there a configuration/mapping that would protect against circular references?