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

Numeric rowversions doesn't need a HasConversion call #4725

Closed
cremor opened this issue May 15, 2024 · 1 comment · Fixed by #4764
Closed

Numeric rowversions doesn't need a HasConversion call #4725

cremor opened this issue May 15, 2024 · 1 comment · Fixed by #4764

Comments

@cremor
Copy link

cremor commented May 15, 2024

Type of issue

Missing information

Description

The section Numeric rowversions for SQL Azure/SQL Server is written in a way that implies that the call to HasConversion<byte[]>() is required to get this new feature to work.

But from my tests it looks like this works automatically when you have an ulong property with the Timestamp attribute.
I haven't tested it but I assume the same is true for fluent mapping via IsRowVersion().

So why does the documentation explicitly call HasConversion<byte[]>()?
The difference isn't that important with fluent mapping, but in the case of attribute mapping it's very important since there is no way to specify HasConversion<byte[]>() as an attribute.

Page URL

https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/whatsnew#numeric-rowversions-for-sql-azuresql-server

Content source URL

https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/what-is-new/ef-core-8.0/whatsnew.md

Document Version Independent Id

97203c5d-fe52-b71e-dcb3-71c9492b4e04

Article author

@ajcvickers

roji added a commit to roji/EntityFramework.Docs that referenced this issue May 15, 2024
@roji roji self-assigned this May 15, 2024
@roji
Copy link
Member

roji commented May 15, 2024

Thanks, submitted #4727 to fix. Note that it's generally very easy to just open a PR suggesting a small change rather than describe it in an issue etc.

@roji roji added this to the 8.0.0 milestone May 15, 2024
ajcvickers added a commit that referenced this issue Jul 15, 2024
Fixes #4725

(I thought I tested this before, but apparently I got it wrong or something changed...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment