public void DeleteTracked(TrackedEntity tracked)
 {
     if (tracked == null)
     {
         return;
     }
     if (tracked.Delete())
     {
         DetachTracked(tracked);
     }
 }
        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);
            }
        }