Hi, I have been working on the entity framework for a short span of time. My question is regarding savechanges() or rather what exactly is hapening in this scenario. I have 3 tables: Container , subcontainer, innercontainer there is a 1-n relation between tables in the specified order. i have added used the AddObject() to add the objects into the context and i am calleing save changes at the end of it all. But wen i so that i get this following error: "Unable to determine the principal end of the FK relationship. Multiple added entities may have the same …

Member Avatar
Member Avatar
+0 forum 1

![2c915acada1248ef9a1127460f5c34c5](/attachments/small/4/2c915acada1248ef9a1127460f5c34c5.png "align-left") ![163de4b108e6016cbbd130f16496ce47](/attachments/small/4/163de4b108e6016cbbd130f16496ce47.png "align-right") Well, im a beginner and im having some problems with the code. On the display it shows System.Data.Objects.ObjectQuery 1[System.String](on the left). Im trying to merge two diferent tabels by taking Naziv from a different table and adding it to the grid.Another table for the combo(three tables, on the right) And here is the complete code from the class: KozmetikaEntitiess tretmanProdukti = new KozmetikaEntitiess(); public frmTretmaniProdukti() { InitializeComponent(); } public frmTretmaniProdukti(frmMain parent) { InitializeComponent(); MdiParent = parent; } private void frmTretmaniProdukti_Load(object sender, EventArgs e) { cmbTretman.DisplayMember = "Naziv"; cmbTretman.ValueMember = "TretmanID"; cmbTretman.DataSource = from tretman in tretmanProdukti.Tretmani …

Member Avatar
Member Avatar
+0 forum 1

HI, I am writing unit test cases for silver light view model. When i am trying to mock edmx context, i am getting errors as in the screen shot. Please suggest how to solve the issue. ![9559cdb1d93cc91198a358bac62eeca5](/attachments/large/2/9559cdb1d93cc91198a358bac62eeca5.png "9559cdb1d93cc91198a358bac62eeca5") Thanks kvk

Member Avatar
+0 forum 0

The End.