Unable to update the EntitySet '' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation
Got the above error when I was writing Code to insert data using EntityDataModel with below code
Student_Marks sMarks = new Student_Marks();
sMarks.Student_Id = int.Parse(model.Student_Id);
sMarks.Marks = int.Parse(model.Marks);
DBobj.AddToStudent_Marks(sMarks);
DBobj.SaveChanges();
Solution : I rechecked Table Student_marks in Database and Primary Key was not
set in the table , I set the primary key and above problem was resolved
well done my genius boy....
ReplyDeleteit saved me!
cheers!