I want to make use of the new features in .Net 2 to allow something like:
Code:
public Blog(){
posts = new EntitySet<Post>(delegate(Post p) { p.Blog = this; }, delegate(Post p) { p.Blog = null; }})
}
Assume that EntitySet is a collection that inherit from PersistantCollection.
The prolem is that when loading from a database, I get the default implementation, which obviously is not good enough since it doesn't have the proper add/remove methods.
How do I make NHib understand that I added a new collection and
How do I make NHib use the instance that I created in the class ctor?