I'm using Z.EntityFramework.Plus package to implement the audit feature in my project; I'm following the DB first approach, I run the query that created the two audit tables as described here: by updating the .edmx file I got those new DBsets
public virtual DbSet<AuditEntries> AuditEntries { get; set; }
public virtual DbSet<AuditEntryProperties> AuditEntryProperties { get; set; }
now I want to retrieve the audit history, I use Where
extension method in Z.EntityFramework.Plus namespace:
var auditlog = AuditExtensions.Where<TbAdditions>(oContext.AuditEntries, id).ToList();
but the compiler is yelling out at me, that he can't cast the DBset<AuditEntry>
to DBSet<AuditEntries>
as in the Where
definition it requires DbSet<AuditEntry>
, not DbSet<AuditEntries>
, should I change the name of the table?
AuditEntries
here then? Surely that should beAuditEntry
? – DavidG Jul 9 '17 at 13:57AuditEntry
built-in the package itself , I'm confused between it and the created tableAuditEntries
– mshwf Jul 9 '17 at 14:01AuditEntry
, don't create your own. – DavidG Jul 9 '17 at 14:01