/// <summary> /// Inserts an object into the List of tracked objects and marks it as unmodified /// </summary> /// <param name="obj">object that should be tracked</param> public void Track(object obj) { if (obj != null) { ChangeTrackerEntry cte = new ChangeTrackerEntry(obj); _objects.Add(cte); } }
/// <summary> /// Inserts an object to be tracked /// </summary> /// <param name="obj">the objects that should be inserted (must be Object with Table attribute)</param> public void Insert(object obj) { if (obj != null) { ChangeTrackerEntry cte = new ChangeTrackerEntry(obj, ChangeTrackerEntry.States.Added); _objects.Add(cte); } }
private void ExecuteDelete(ChangeTrackerEntry entry) { _db.Delete(entry.Item); }
private void ExecuteInsert(ChangeTrackerEntry entry) { _db.Insert(entry.Item); }
private void ExecuteUpdate(ChangeTrackerEntry entry) { _db.Update(entry.Item); }