I get a System.Data.Linq.DuplicateKeyException when adding an entity to an empty table.
grade g = new grade();
g.subject = dc.subjects.Single(x => x.subjectID == 5);
g.student = aStudent;
dc.grades.InsertOnSubmit(g);
I dropped the entire table itself and recreated it with no luck. Grades is a join table with subjectID and studentID as foreign keys.
Any ideas?