Link table handling

Link table handling

Old forum URL: forums.lhotka.net/forums/t/6102.aspx


rcx141 posted on Wednesday, January 07, 2009

I've started learning CSLA to handle the CRUD portion of my app. I've figured out how to use EditableRootCollection and EditableChild so I can display grids of, say, users, and allow the user to add and configure users and roles. Now I'd like to build a control which lets me assign users to roles. I was thinking that I'd have the user select a user and then have a checkListBox with the roles in it, and the user would check the roles he wanted that user to have, and the result would be a link table populated with users & roles. What's the CSLA way of doing this?

Fintanv replied on Thursday, January 08, 2009

The user child object can contain a child collection of roles.  The roles object would contain the role name and a boolean indicating whether or not it is currently assigned to the user.

If you have not already done so I highly recommend getting Rocky's book.

Regards,
Fintan

Copyright (c) Marimer LLC