Exemplo n.º 1
0
 public void DeleteTracked(TrackedEntity tracked)
 {
     if (tracked == null)
     {
         return;
     }
     if (tracked.Delete())
     {
         DetachTracked(tracked);
     }
 }
Exemplo n.º 2
0
        public void Delete <T>(T entity, string keyName = null) where T : class
        {
            if (entity == null)
            {
                return;
            }
            TrackedEntity <T> t = Get <T>(entity);

            if (t == null)
            {
                t = Add <T>(entity, false, keyName: keyName);
            }
            if (t.Delete(keyName))
            {
                DetachTracked(t);
            }
        }