Click here to Skip to main content
15,894,539 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
while inserting records in a loop
The property "id" is part of the object's key information and cannot be modified 



C#
secProductionRepository.Add(tblSecProduction);
     Nuow.SaveChanges();



What can i do to inset records. i am inserting new record not modifying old records.
Posted
Updated 18-Jan-16 1:39am
v2

1 solution

I Resolved it
I was not creating object every time in the loop
I have to Create new object each time in the loop. It is working fine now
 
Share this answer
 

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