I'm trying to create these three models in EF 4.3:
- Family
- Guid FamilyId
- ICollection< Person> Members
- Company
- Guid CompanyId
- ICollection< Person> Employees
- Person
- Guid PersonId
- String Name
A person can belong to multiple families and multiple companies, as well as doesn't belong to any.
After running the code, the mapping in the database seems a bit strange. Family-Members and Company-Employees were not mapped. Also, there are four columns in the Persons table: PersonId, Name, Family_FamilyId and Company_CompanyId.
I think my code is meant to be that a Person will always belong to 1 Family and 1 Company. How should I change the code?