3

I want to use Audit.EntityFramework with EntityFramework Core but ignore inserts in audit logs only for some entities. I cannot find any info about that on the github documentation for Audit.EntityFramework. Maybe someone faced same problem and could help me out.

1 Answers1

0

Here is the readme document for Audit.EntityFramework

You can choose between and Opt-In or an Opt-Out mechanism. You can ignore/include entities by decorating the entity models or by configuration on your startup.

Sample extract from the documentation:

Audit.EntityFramework.Configuration.Setup()
    .ForContext<MyContext>(config => config
        .IncludeEntityObjects()
        .AuditEventType("{context}:{database}"))
    .UseOptOut()
        .IgnoreAny(t => t.Name.EndsWith("History"));
thepirat000
  • 12,362
  • 4
  • 46
  • 72