-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
Concurrency Field - Not Reacting to Parameters Changing #33943
Comments
@crazyfox55 ... Before I ping the product unit for assistance, what database provider are you using? |
The database I'm using is sqlite, just like the sample uses. |
No 🎲🎲 with that provider ... it no-ops that way for sure. I added a paragraph on it to the article in the Sample app section a while back ...
To confirm if your report is correct on that point about what the product unit sent over in the sample app, you would need to use a different provider that can take advantage of the automatic tokens ... OR ... do what you did (I think) and set up the concurrency manually and not try to rely on the automatic tokens. Perhaps, what I should do here is take that paragraph and make a section out of it, which should help readers discover it. ... and then I'm not sure if ...
... is a separate problem or not. Pinging @mikekistler to take a look at this issue; and although he's no longer working Blazor issues, this is a sample that was originally provided by @JeremyLikness, and he might have a sec to remark on this. |
Pinging @mikekistler again to take a look at ...
Note that on the other point about the sample not working OOB for concurrency that it uses SQLite OOB, which doesn't support database-generated concurrency tokens. Presumably, changing to SQL Server, for example, will result in the concurrency feature lighting up in the app. The article already covers it, but I'm going to make a section out of the remarks to make it easier for readers to discover this point. |
If he knows, sure. I think I probably should just use SQL Server for the app to light-up the concurrency feature ... and then it should be easy to confirm if the Not sure when I'll reach this. I'm still working on the WASM+Identity 2FA/TOTP stuff, and I still have a handful of .NET 9 items that I'd like to address before we bug out for the 🦃 day holiday. |
UPDATE (12/5): I'm working on getting back to this issue, but we have internal projects going on and a backlog of higher-priority items + holiday vacations + exhausted folks 😩. I'll get back here ASAP 🏃♂. |
UPDATE (12/20): This didn't make it for '24 due to other high priority work items, but that backlog has largely been cleared out. I'll be back from the 🎄 holidays in January to work on this. |
Ok ... I'm BACK! 🏃♂ I'm going to consider adding content to use the sample with SQL Server to light up the concurrency features that were built into the sample app. I don't want to move the sample to SQL Server, and I don't want to remove the bits that Jeremy put into the sample app to manage concurrency. We'll see how it turns out! 🤞🍀 |
Description
Moved from dotnet/blazor-samples#378 ...
https://github.com/dotnet/blazor-samples/blob/d000234099558a1db2258a77d242e04ef2a9cfe7/8.0/BlazorWebAppEFCore/Components/ConcurrencyField.razor#L36-L47
This should be using the
OnParametersSet
, such that when theDbModel
changes theproperty
is checked again. Also none of the properties of theContact
haveConcurrencyCheck
attributes, so the newest EF core will not automatically fail. I suggest adding theConcurrencyCheck
attribute to at least one property or every property because the UI implies the whole object is checked for concurrency.cc: @crazyfox55
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/blazor-ef-core?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/blazor-ef-core.md
Document ID
2ebc5e4d-bab4-6d30-9018-9a712c482236
Article author
@guardrex
The text was updated successfully, but these errors were encountered: