Beispiel #1
0
 /// <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);
     }
 }
Beispiel #2
0
 /// <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);
     }
 }
Beispiel #3
0
 private void ExecuteDelete(ChangeTrackerEntry entry)
 {
     _db.Delete(entry.Item);
 }
Beispiel #4
0
 private void ExecuteInsert(ChangeTrackerEntry entry)
 {
     _db.Insert(entry.Item);
 }
Beispiel #5
0
 private void ExecuteUpdate(ChangeTrackerEntry entry)
 {
     _db.Update(entry.Item);
 }