I have enabled optimistic concurrency and there is a table where I use a after insert trigger where a set a column value in the table on insert (special logic?
the problem is that this change in the trigger for that column is not reflected in the grid after reload the data with grod0.reload() and the Update fails in the page because there is a concurrency conflict.
how to refresh/reload the data after insert to reflected also Trigger changes?
I'm not sure if I understand - you mean I should add "AsNoTracking()"?
the problem is not the grid itself - if I open the new row in the edit form and press save I get an error:
If I look at the update SQL statement I can see that the value of the column whcih was changed in the database Trigger is still the default value not the value in the inserted row...
the problem is not the "Tracking" because the value of that column is Computed on the server inside the Trigger but EF doesn't recognize this.
In the model there is the [ConcurrencyCheck] Annotation so removing this is a solution or to add this:
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
[ConcurrencyCheck]
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public string Aktenzahl
{
get;
set;
}
the problem is that If I change this it is not persistant because on the next database refresh the model definition is overwritten...