So, In my old Linq-To-SQL I would write code like this
var tableItem = new Table
{
Prop1 = var1
Prop2 = var2,
Prop3 = var3,
ParentTableID = parentRecordID
};
db.Table.InsertOnSubmit(tableItem);
db.SubmitChanges();
After converting my working code from Linq-To-SQL to Entity Framework (v3.5) the ParentTableID
property is no longer there and I'm at a loss as to how I can create this related child record.
I'm not sure what I should change for my entity framework version, besides the obvious call to SaveChanges();
instead of SubmitChanges()
:(