For example, I have people, locations, and a personal table to link them. I also have a role and a personal table.
Tables:
Person (personid, name)
Personlocation (personid, locationid)
Location (locationid, description)
Personrole (personid, roleid)
Role (roleid, description)
EF will provide me with faces, roles, and location objects.
Since EF will NOT generate the personlocation and personrole types, they cannot be used in the request.
QUESTION: how can I add a Person object and return a personid and then add this 3-role identifier to the Personrole table / association?
eg.
Person p = new Person();
p.name = "John"
......
entity.AddToPersons(p);
for(var roleid in Roleid)
entity.AddtoRoles(roleid)?
source
share