Hi All.
Help needed again.
I need to save data to table and to its reference table.
This is my entity diagram
Main Table: Contact:
Contact----(1----0..1)-----Position
Contact----(1----0..1)-----SpokenLanguage
Contact----(1----0..1)-----Department
CommuncationContact ------> Contact that is CommuncationContact table is inheriting Contact.
Here is the code:
Domain.Contact AddContact = new Domain.Contact(); |
|
SpokenLanguage UserLanguage=new SpokenLanguage(); |
Position userPosition=new Position(); |
Department UserDepartment=new Department(); |
|
AddContact.Common_SpokenLanguage=UserLanguage; |
AddContact.Common_Position=userPosition; |
AddContact.Common_Department=UserDepartment; |
|
AddContact.UserId=txtId.Text; |
|
//Now i need to set value for of status property in Position field |
//what should i use?? |
|
AddContact.Common_Position.Status=.... |
//Is this correct? |
|
|
Again CommunicationContact entity is inheriting table Contact.
How to add data to CommuncatioNContact Table also?
Do anybody have example of storing data to a table , to its reference table and to inherited table using Entity ??
Varun