You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cannot convert from 'System.Collections.Generic.IEnumerable<Z.EntityFramework.Plus.AuditEntry>' to 'MyProject.MyDataModels.AuditEntries'
Also note that I changed these marked lines:
Fiddle or Project
Fiddle: based on the default DB first fiddle I created this fiddle which produces the same error.
I also created a test project with code first and sqlite connection where everything works fine. Then from those entities I scaffolded the db and get above error.
The issue happens because your Import should return a DbAuditEntry and DbAuditEntryProperty type. You currently return the wrong entity type which leads to this error.
Description
Based on this documentation I am trying to implement AutoSave audit logging with database-first approach using Entity Framework Core plus audit.
However on the last line (in AddRange) in below code I get an error (see Exception):
Exception
cannot convert from 'System.Collections.Generic.IEnumerable<Z.EntityFramework.Plus.AuditEntry>' to 'MyProject.MyDataModels.AuditEntries'
Also note that I changed these marked lines:
Fiddle or Project
Fiddle: based on the default DB first fiddle I created this fiddle which produces the same error.
I also created a test project with code first and sqlite connection where everything works fine. Then from those entities I scaffolded the db and get above error.
I uploaded my test project here
Further technical details
Hope you can help figure out what I am doing wrong.
The text was updated successfully, but these errors were encountered: