How do you handle the case when an entity needs to create, in one of its methods, other entities? My problem is that since each individual entity doesn't have access ObjectContext object, that one with the AddToBlahs() methods, it cannot do it.
For example, having a Site model that has a UpdateLinks() method that is supposed to create Link objects belonging to that Site. The UpdateLinks() method doesn't have an ObjectContext. What do you do? Do you pass one to it, like this:
public void UpdateLinks(ProjectEntities db) {
foreach (var link in FetchLinks()) {
db.AddToLinks(link);
}
}
or do you use another pattern?