Exemplo n.º 1
0
        public void OnPostLoad(PostLoadEvent @event)
        {
            var trackableEntity = @event.Entity as INotifyPropertyChanged;

            if (trackableEntity != null)
            {
                EntityEntry entry = @event.Session.PersistenceContext.GetEntry(@event.Entity);
                entry.BackSetStatus(Status.ReadOnly);
                entry.BackSetTracer(new EntityTracer(entry, trackableEntity));
            }
        }