Exception On SaveChanges when Audit.Net Entity framework have High-Level Interceptions #679
-
Hello, I have encountered a small problem. I am trying to audit my entities, but when I attempt to call SaveChanges with the interceptor implemented, I receive this error: System.MissingMethodException: 'Constructor on type 'Appia.Store.AppDBC' not found.' `using Audit.EntityFramework; namespace Appia.Store; public class AppDBC : DbContext, IDataProtectionKeyContext
}
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The constructor of your DbContext requires one parameter of type Try changing this line .UseDbContext<AppDBC>() To something like this: .UseDbContext<AppDBC>(new DbContextOptionsBuilder<AppDBC>().UseSqlServer("YourConnectionString").Options) |
Beta Was this translation helpful? Give feedback.
The constructor of your DbContext requires one parameter of type
DbContextOptions<AppDBC>
.Try changing this line
To something like this: