views:

28

answers:

1

i have a 2 tables in db . Person and child they are hirarchy it means my child table has an Id that is PRIMARY KEY but not auto inceremental.this Id fill by Id of Parent table

i have created a EDMX from these but when i wanna save a child i cant see the fields of parent in my child class in EF its not supported ?

i wanna does it like NHIBENATE please help me what should i do. thanks

A: 

Probably you shoud just write something like

ChildInstance.Parent = ParentInstance;

By this assignment you set the necessary relationship explicitly. You don't need to assign key properties manually in EF.

Devart