how to update the values of other model property value without changing the value of specific property(which only accept unique values)
I am building a simple project in Razor Page using dotnet6. I am new to asp.net core. i have a model ‘Class’ with property ‘RollNo’ Model property which only accepts unique value. unique attribute validation
The problem is when i try to update the values of other property without changing the current value of ‘RollNo’, it obviously doesn’t allow me to do so with validation error “Roll number already exists.” because the current value of ‘RollNo’ already exist in my SQL Server. So my Question is how do i update rest of the model property without changing the value of property that only accepts unique value.