This question may sound a bit vague, so let me clarify. Say I have a Group entity which contains Users. Any user can be in multiple groups. Now if I want to add a user (to the group) I could do that this way:
GroupUserEntity gu = new GroupUserEntity();
gu.UserId = user.UserId;
gu.GroupId = group.GroupId;
gu.Save();
What I would like to know is, is if it's also possible to do this like this (I tried it and I can't seem to get it working):
group.Users.Add(new UserEntity(user.UserId));
group.Users.SaveMulti(true);
Also I would like to know if it's possible to delete in this way, like this:
group.Users.Delete(new UserEntity(user.UserId));
I would like this to remove the relationship, not the actual user.
I have hidden the relationships with the linktable in the group and user entities because I think LLBLGen abstracts this away nicely, but maybe this isn't the brightest idea.
Am I on the good path here, or do I just need to stop whining and use the linktable entities?
(using LLBLGen 2.6 latest)