Issues with Repository Hooks OnAddExecuted OnDeleteExecuted

12 views
Skip to first unread message

Dannie F

unread,
Nov 26, 2015, 4:59:13 PM11/26/15
to SharpRepository
I am trying to implement an audit attribute where I serialize the entity to the table. However i am having the following issues:

  1. In the OnAddExecuted hook, the identity key is not refreshed from the database. The primary key is an integer whose value is 0 before the Add operation, however in the hook, the value is not set from the database.
  2. In the OnDeleteExecuted hook, I am deleting an entity with a navigation property set, however the value of the property is null in the hook.
Any insight would be appreciated.
Reply all
Reply to author
Forward
0 new messages