I downloaded ABP template from website:
I read how to enable Entity History and did these steps:
PreInitialize()
method, I add:// Entity History
Configuration.EntityHistory.IsEnabled = true;
Configuration.EntityHistory.IsEnabledForAnonymousUsers = false;
Configuration.EntityHistory.Selectors.Add(
new NamedTypeSelector(
"Abp.FullAuditedEntities",
type => typeof(IFullAudited).IsAssignableFrom(type)
)
);
// Entity History tables
public virtual DbSet<EntityChange> EntityChanges { get; set; }
public virtual DbSet<EntityChangeSet> EntityChangeSets { get; set; }
public virtual DbSet<EntityPropertyChange> EntityPropertyChanges { get; set; }
But the Entity History didn't work. Is there something wrong in my steps? And how to fix it?
Entity Framework 6x doesn't support Entity History. As far as I see you are adding the tables to your DbContext and you don't get exception. so you might be using MVC5 which has no Entity History support.