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.
Excuse my way of asking question as i am new here and currently don’t have enough experience. Also Thanks in advance.
Neerajan Rai is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.