Hi there,
I'm using LLBLGen v3.1, SQL Server 2008 R2, and .net 4
I am extending AuditorBase.
I am trying to get the primary key from the newly inserted entity object passed into AuditEntityFieldSet, but the ID comes up 0 for new records.
The code I'm using is simply this:
a.RecordId = ((VolunteerEntity)entity).VolunteerId;
For updated records, I do get the ID key as needed.
Also, I can get the ID for inserts in the AuditInsertOfNewEntity method, so, I assume my understanding that these methods are run AFTER insert and after the entity is refreshed from the database record is true.
The question is then, what am I doing wrong?
Thanks!