Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
 private void ExecuteDelete(ChangeTrackerEntry entry)
 {
     _db.Delete(entry.Item);
 }
Exemplo n.º 4
0
 private void ExecuteInsert(ChangeTrackerEntry entry)
 {
     _db.Insert(entry.Item);
 }
Exemplo n.º 5
0
 private void ExecuteUpdate(ChangeTrackerEntry entry)
 {
     _db.Update(entry.Item);
 }