Can you confirm that the History is enable only on .Net EF Core?
I check the compare map and I don't find anything about that?
Mattia
7 Answer(s)
-
0
Please see here: https://aspnetboilerplate.com/Pages/Documents/Entity-History#entity-framework-6-x
-
0
thk because on stackoverflow there was an old answer or probably old answer... Stackoverflow.
So now I add on my core module this 2 lines
Configuration.EntityHistory.IsEnabled = true; Configuration.EntityHistory.Selectors.Add("Activity", typeof(Activities.Activity));
but no history works... I check on my db and I don't find any table named History? is it correct? Or maybe I lost some migration?
-
0
What is your abp version?
-
0
Sorry I forget to write it: ABP / ABP Zerp 4.2.0
-
0
[Entity History Support for EF6] This feature requires abp version greater than or equal to 4.5.
https://github.com/aspnetboilerplate/aspnetboilerplate/pull/4358
-
0
Hi maliming
I update my solution to 4.8.1 and now on my DB there are the History Log Tables. So I add the code like in the documenation to track my entity Activity a do an update but nothing will be tracked on DB
[Audited] public class Activity : FullAuditedEntity<long>, IMustHaveTenant { public int TenantId { get; set; } public DateTime Date { get; set; } public DateTime IntTime { get; set; } ... } // On my PreInitialize module Configuration.EntityHistory.IsEnabled = true; Configuration.EntityHistory.Selectors.Add(new NamedTypeSelector( "Abp.FullAuditedEntities", type => typeof (IFullAudited).IsAssignableFrom(type) ));
what I'm wrong?
-
0
Sorry my mistake.
My application is multidbcontext so on other dbcontext then the first I've used AbpDbContext that not has implemented the HistoryEntity. So I change my dbcontext to use AbpZeroDbContext so now history works well.