public void Delete() { try { rt.core.model.core.Permission entityC = CreateNew(); manager.Save(entityC); manager.Session.GetISession().Flush(); manager.Session.GetISession().Clear(); rt.core.model.core.Permission entity = GetFirstPermission(); manager.Delete(entity); entity = manager.GetById(entity.Id); Assert.IsNull(entity); } catch (Exception ex) { Assert.Fail(ex.ToString()); } }