I have a many to many relationship between User and Survey, the relationship is bi-directional, so when adding a new survey for a list of users
, I need to do this:
foreach(User user in users)
{
survey.Users.Add(user);
user.Survey.Add(survey);
}
Iterating through all of the users looks overkill to me as there can be many users.
Isn't there a better way? Is it possible to have a unidirectional many to many?