Beispiel #1
0
 public void Attach(TEntity entity, EntityUpdateMode updmod, EntityTrackingMode trmod)
 {
     if (_table.ContainsKey(entity))
     {
         _table[entity].CqlEntityUpdateMode   = updmod;
         _table[entity].CqlEntityTrackingMode = trmod;
         _table[entity].Entity = entity;
     }
     else
     {
         _table.Add(Clone(entity), new TableEntry()
         {
             Entity = entity, MutationType = MutationType.None, CqlEntityUpdateMode = updmod, CqlEntityTrackingMode = trmod
         });
     }
 }
 public void Attach(TEntity entity, EntityUpdateMode updmod = EntityUpdateMode.AllOrNone,
                    EntityTrackingMode trmod = EntityTrackingMode.KeepAttachedAfterSave)
 {
     _context.Attach(this, entity, updmod, trmod);
 }
Beispiel #3
0
 public void Attach <TEntity>(Table <TEntity> table, TEntity entity, EntityUpdateMode updmod = EntityUpdateMode.AllOrNone,
                              EntityTrackingMode trmod = EntityTrackingMode.KeepAttachedAfterSave)
 {
     (_mutationTrackers[table.GetQuotedTableName()] as MutationTracker <TEntity>).Attach(entity, updmod, trmod);
 }