public ChangeTrackingCollection <T> AttachCollection <T>(IEnumerable <T> entities, bool takeSnapshot = true) where T : class { var chtc = new ChangeTrackingCollection <T>(this); if (entities != null) { foreach (var obj in entities) { chtc.Attach(obj, takeSnapshot); } } return(chtc); }
public ChangeTrackingCollection <T> AddNewCollection <T>(IEnumerable <T> entities) where T : class { if (entities == null) { return(null); } var chtc = new ChangeTrackingCollection <T>(this); if (entities != null) { foreach (var obj in entities) { chtc.Add(obj); } } return(chtc); }
public ChangeTrackingCollection <T> CreateTrackingCollection <T>() where T : class { var chtc = new ChangeTrackingCollection <T>(this); return(chtc); }