Gunnar, 

I know that I should use a method to maintain the relationship.
That's not the point of my question.
And TheCPUWizard said something else, that it's a bad design which I do not 
understand why he says that.

In my post, I have specific questions regarding specific things I do not 
understand.


On Friday, December 28, 2012 5:14:17 PM UTC+2, Gunnar Liljas wrote:
>
> It's an *inconvenient* design, in that it requires two steps, and 
> allows for ambiguous data. 
>
> One small thing you can to is to create a group.AddUser method, which 
> both adds the user and sets its group. 
>
> The next step would be to not expose group.Users as a collection (map 
> it to a backing field instead and just expose the property as an 
> IEnumerable<User>), so that its impossible to use Users.Add directly. 
>
> /G 
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/xVIA8QVCVQgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to