Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Relation tables insert but I take a error.How to solve this problem?

This error is
an entity object cannot be referenced by multiple instances of ientitychangetracker.


What I have tried:

var 
studentClassNumber=DContext.Instance().StudentEntities.tblStudentInformation.ToList();
DContext.Instance().StudEntities.tblStudentInformation.AddRange(studentClassNumber);
DContext.Instance().StudEntities.SaveChanges();

This error is take bold row
an entity object cannot be referenced by multiple instances of ientitychangetracker.
Posted
Updated 26-Sep-18 10:05am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900