It could be triggered in two cases:
1)The entity property is defined in the conceptual layer with an attribute of ConcurrencyMode="fixed"(A property of Entity Framework, Not SQL Server).When this attribute is used, Object Services checks for changes in the database before saving changes to the database. Any conflicting changes will cause an OptimisticConcurrencyException.
By default, however, Object Services saves object changes to the database without checking for concurrency.
2)An OptimisticConcurrencyException can also occur when you define an Entity Data Model that uses stored procedures to make updates to the data source. In this case, the exception is raised when the stored procedure that is used to perform updates reports that zero rows were updated.
No comments:
Post a Comment