Getting a the new value of RowVersion using Entity Framework 6

asp.net-mvc asp.net-mvc-5 entity-framework entity-framework-6

Question

Is it possible to obtain the updated RowVersion value while maintaining the same DbContext and avoiding having to reload the entity from the database?

Scenario:

  • data into the editor form.
  • new values saved
  • A new value for RowVersion is generated as the row in the table is updated.
  • RowVersion's old value, however, is still stored in the saved object, therefore the client cannot receive the new value.

Every concurrency control article typically just addresses how to stop the update (e.g. see this). In contrast, a successful update in the article's example is followed by a page redirect, when the stored object is read once more and given a new RowVersion value. I want to stay away from this detour.

1
1
1/2/2014 2:29:37 AM

Accepted Answer

ZZZ_tmp
1
1/2/2014 9:16:31 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow