Closed StickNitro closed 2 years ago
Hi, this library translates C# code into SQL trigger. After inserting CalendarAuditEntity should be executed content of ToCalendarAudit() method, which is not available when the trigger is fired. But for insert an entity based on the entity before the update you can use a syntax like
(oldUpdatedEntity, newUpdatedEntity) => new CalendarAuditEntity
{
Field1 = oldUpdatedEntity.Field1,
Field2 = oldUpdatedEntity.Field2
}
I have the following which I took from examples I have seen
When I run this through a
IEntityTypeConfiguration
instance I am getting aNotImplementedException
and for the life of me I cannot see what is wrong with this. I have a base tablebuilder
is theCalendar
table and on update I want to insert the updated record into theCalendarAudit
table.NOTE:
oldUpdatedEntity.ToCalendarAudit()
returns a newCalendarAuditEntity
instance.Any help would be appreciated!
DotNet Core -> 6. EF Core -> 6. Laraue.EfCoreTriggers -> 6.1.*