Exemplo n.º 1
0
        private void AppendListeners(NHibernate.Cfg.Configuration configuration)
        {
            configuration.AppendListeners(ListenerType.PreInsert, new[]
            {
                new SetCoreProperties()
            });
            var softDeleteListener = new SoftDeleteListener();

            configuration.SetListener(ListenerType.Delete, softDeleteListener);
        }
Exemplo n.º 2
0
 public override void AlterConfiguration(NHibernate.Cfg.Configuration cfg)
 {
     cfg.AppendListeners(NHibernate.Event.ListenerType.PostLoad, new[] { new RelationInsertEventListener() });
     //cfg.AppendListeners(NHibernate.Event.ListenerType.PreInsert, new[] { new DetailRelationEventListener() });
     //cfg.AppendListeners(NHibernate.Event.ListenerType.PreUpdate, new[] { new DetailRelationEventListener() });
 }