Apr 25, 2020 04:44 PM|hamed_1983|LINK
my problem is that when i disable my input control as follow :
<label asp-for="OrderId" class="control-label"></label>
<input asp-for="OrderId" class="form-control" value="@ViewData["_orderID"]" disabled="disabled" />
<span asp-validation-for="OrderId" class="text-danger"></span>
I'm facing this error during update :
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
But when i remove disable tag from my input element it works correctly!!!
What's the problem & how to solve it ?
Note : The given input field (OrderId) is primary key for my Orders table.
Thanks in advance