Jagjit Saini

Jagjit Saini

  • NA
  • 196
  • 38.1k

Error - System.Data.Linq.ChangeConflictException:

Feb 22 2022 3:28 PM

Hi

   on this line dbContext.SubmitChanges(); i get error - System.Data.Linq.ChangeConflictException: 'Row not found or changed.'

protected void btnUpdate_Click(object sender, EventArgs e)
        {
            using (SampleDataContext dbContext = new SampleDataContext())
            {
                Employee objEmployee = dbContext.Employees.SingleOrDefault(x => x.EmployeeID == "ET001");
                objEmployee.FirstName = "Harjeet";
                dbContext.SubmitChanges();
            }
        }

Thanks


Answers (1)