Posted on: 5/16/2012 3:58:07 AM | Views : 251

I have three .EDMX tables, Scholar(ScholarID ), ScholarSubject(ScholarID, SubjectID, NCS), Subject(SubjectID). I have a pre-defined list of subjects (in Subject table) that I wish to choose from and add to my ScholarSubject table.
My logic is, I have a scholar (who I've already added to the database) who chooses many subjects (pre-defined list of subject) and each subject has NCS mark. I would like to be able to insert into the join table between Subjects and Scholars, but I'm getting the error:
"Unable to update the EntitySet 'ScholarSubject' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation." My code for the insert in my Business Logic Layer:
public void addSubjects(int scholarID, int subjectID, int NCS) { using (DataLayer.CareerDatabaseEntities context = new DataLayer.CareerDatabas ...

Go to the complete details ...