Retrieving column initialized by trigger returns null
a certain property of ComplaintEntity gets initialized via db trigger after the entity gets inserted in the db... Retrieving this newly created entity seems to occur before said property gets initialized. How do i wait for the trigger to execute? Thread.Delay does not work
2 Replies
are you using entity framework or similar under the hood?
ef out of the box tracks already loaded entities and does not query the data again in the same context
simply opening a new context might work
or set the tracking state to detached
context.Entities(complaint).State = EntityState.Detached;
that got it working, thanks!