using System.Collections.Generic; using System.Collections; namespace Marr.Data { /// /// Stores an entity along with all of its 1-M IList references. /// public class EntityReference { public EntityReference(object entity) { Entity = entity; ChildLists = new Dictionary(); } public object Entity { get; private set; } public Dictionary ChildLists { get; private set; } public void AddChildList(string memberName, IList list) { if (ChildLists.ContainsKey(memberName)) ChildLists[memberName] = list; else ChildLists.Add(memberName, list); } } }