public class Node
{
public virtual int Id {get; set;}
public virtual string Name {get; set;}
public virtual IList<Node> Ancestors {get; set;}
public virtual IList<Node> Descendants {get; set;}
}
how to setup the mapping convention for this case?
thank you
Are you sure you want a convention? I am going to guess you just want a fluent mapping. Here's an example from the last time I helped someone with this:
See here for the original thread. That thread has a link to an example project I made for demonstrating self referencing many-to-many relationships, which is here.