Please add a feature to automatically set ConcurrencyMode=Fixed.
EF defaults to no concurrency control (last write wins) which allows lost updates.
Enforcing optimistic concurrency checks can explicitly be configured by setting ConcurrencyMode=Fixed on a RowVersion column.
Having to do this manually when recreating an EF model from a database we risk forgetting it and running without concurrency control. Almost every DB application uses concurrency control and I expect there to be a way to automatically make the setting and not have to manually set it for each table.
Comments: Please consider not only tying to the SQL Server RowVersion datatype. Using a naming convention like column name = "RowVer" would be more flexible and especially enable this feature for other databases like Oracle too. With ADO.NET it is always a nuisance for us that only SQLCommandBuilder implements the ConflictOption CompareRowVersion and Oracle CommandBuilder does not, while this would have been so easy to provide.
EF defaults to no concurrency control (last write wins) which allows lost updates.
Enforcing optimistic concurrency checks can explicitly be configured by setting ConcurrencyMode=Fixed on a RowVersion column.
Having to do this manually when recreating an EF model from a database we risk forgetting it and running without concurrency control. Almost every DB application uses concurrency control and I expect there to be a way to automatically make the setting and not have to manually set it for each table.
Comments: Please consider not only tying to the SQL Server RowVersion datatype. Using a naming convention like column name = "RowVer" would be more flexible and especially enable this feature for other databases like Oracle too. With ADO.NET it is always a nuisance for us that only SQLCommandBuilder implements the ConflictOption CompareRowVersion and Oracle CommandBuilder does not, while this would have been so easy to provide.