For anybody reading this the solution was to add the following line before SaveChanges() context. SetLink(employee, "Account", account) Simply assigning the account to the employee was not enough, a Link also needed to be established.
For anybody reading this the solution was to add the following line before SaveChanges() context. SetLink(employee, "Account", account); Simply assigning the account to the employee was not enough, a Link also needed to be established.
Nice one. Booking for later as I am sure I will run into this problem when I start on some WCF data services soon. – Joshua Hayes Aug 26 '10 at 1:00 This is the sort of thing that WCF Data Services should be doing for us since in all cases you have to call SetLink after associating two entities.
– Yuck Jun 16 at 19:21.
I am really struggling to insert some data into 2 database tables. I am using Linq over WCF Data Services using Entity Framework 4. Each Employee must have just 1 Account.
However, an Account may not have any Employees at all. I can see from SQL Server that the row has been inserted, and LinqPad reports no error. The problem is when I try to insert both a related Account and Employee row together.
I am sure the code below should work? Entities in 'DbContainer.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.