Skip to content

Concurrency Field - Not Reacting to Parameters Changing #33943

@guardrex

Description

@guardrex

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 the DbModel changes the property is checked again. Also none of the properties of the Contact have ConcurrencyCheck attributes, so the newest EF core will not automatically fail. I suggest adding the ConcurrencyCheck 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

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions