Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is version column in Sql Server supposed to be populated after an update? #700

Open
preiius opened this issue Apr 29, 2024 · 0 comments
Open

Comments

@preiius
Copy link

preiius commented Apr 29, 2024

I have a column like in your example:

    [VersionColumn("Version", VersionColumnType.RowVersion)]
    public byte[] Version { get; set; }

After an update, I have to read poco to get new version, otherwise I get 'System.Data.DBConcurrencyException' exception on subsequent update.

Correct me if I'm wrong, according to following line, are you updating version property after update but for VersionColumnType.Number only?

if (!string.IsNullOrEmpty(preparedStatement.VersionName) && preparedStatement.VersionColumnType == VersionColumnType.Number)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant