是否可以更改 EF6 中的实体列表状态
List<AuditTrail> auditLogs = new List<AuditTrail>();
auditLogs = GetLog(context, CreatedBy);
context.AuditTrails.AddRange(auditLogs);
context.Entry(context.AuditTrails).State = System.Data.Entity.EntityState.Unchanged;
Run Code Online (Sandbox Code Playgroud)
它抛出以下异常。
The entity type DbSet`1 is not part of the model for the current context.
Run Code Online (Sandbox Code Playgroud)
我怎样才能实现上述逻辑?