Retrieve AutoIncrement Value in Global Filter?

I have a table with an [AutoIncrement] field which I’d like to capture the value for every time a new record is added and log it in an audit table.

I had considered using OrmLiteConfig.InsertFilter to write records to audit table. However, the filter appears to fire before the record is inserted and so the value of the [AutoIncrement] field has not yet been set.

Therefore: Is it possible to use a filter to capture an auto-incrementing value?

No the auto incremented Id is generated by the server after the record is inserted and the OrmLiteConfig.InserFilter needs to fire before it’s inserted so custom validation can be used to stop it from being inserted.

Thanks for the clarification. :smile: