Hi,
Can anybody tell be why test = false and how I can do a compare to get it true?
Project PK: ProjectId
ProjectMember PK: ProjectId, MemberId
Since I haven't saved the project yet, I have no project id ... and I can't just set the project id to 0 ... because then pme1 gets removed from the collection somehow ...
ProjectEntity pe = new ProjectEntity();
ProjectMemberEntity pme1 = new ProjectMemberEntity();
pme1.MemberId = 17;
pe.ProjectMembers.Add(pme1);
ProjectMemberEntity pme2 = new ProjectMemberEntity();
pme2.MemberId = 17;
bool test = pe.ProjectMembers[0].Equals(pme2);
And since the equals is false, I can't remove it from the collection ...
Best regards,