Open Max1825 opened 7 years ago
Just create manually the tables or you can create a configuration files to override the default table configuration like:
public class CustomTraceAuditLogConfiguration : EntityTypeConfiguration
And add the configuration to your Context in your OnModelCreating method:
modelBuilder.Configurations.Add(new CustomTraceAuditLogConfiguration());
Sorry @Bemjamin , i follow your step but it still don't work, i already create a table 1st but don't work, next i build a configuration files to override the default table configuration but it still run into error: Any idea sir...:(
Can you show your dbcontext class? I did this at work and it is working.
Here @Bemjamin Thank you so much for helping...
Well, the differences are: I am not using the same dbcontext type as you, I am using the normal TrackerContext. I am only using fluent mapping for all tables I am creating the mapping for both tables: AuditLog and AuditLogDetails I am setting the database intializer to null, in your constructor you can put:
Database.SetInitializer<MyContext>(null);
I hope it helps.
Here @Bemjamin Thank you so much for helping...
Hi, was this ever resolved - I'm having the same issue here. Thanks.
I am also facing the same issue. Any solution?
Hello sir, big fan of your work but I ran in to this error, I build a project using asp.net with Entity Framework, I already install your tracker like 4-steps-tut (very easy to install..), but when I run project, right after db.SaveChanges() code got this error : "The entity type AuditLog is not part of the model for the current context " .. Any ideas to fix this sir?...thank you so much.