How should I go about updating a row in the database? There is no update method, and if I use add and the primary key id already exists, I get an exception. Please provide an ex
Here is a way that worked for me without having to make a query first:
context.Students.Attach(student); context.Entry(student).State = EntityState.Modified; context.SaveChanges();