I have a created a WPF application with Entity framework 4.0. When i am trying to insert record in PhoneNumber Table it inserts first record succes
Entity framework 4.0.
PhoneNumber
You instantiate phnumber only once and then try to insert it in the database multiple times. Move the PhoneNumber phnumber = new PhoneNumber(); phrase inside the foreach (var ph in phoneList) Block.
phnumber
PhoneNumber phnumber = new PhoneNumber();
foreach (var ph in phoneList)