Welcome to the CodeSmith Community!

Re: Question regarding many-to-many

Template Frameworks

A description has not yet been added to this group.

Question regarding many-to-many

Answered (Verified) This question is answered

On an example of Role Management system, I have Users and Roles. A user can be assigned many roles and a role can contain many users. I retrieve a user, modify role list on the client side and then try to submit. When retrieving a user, I do detach User entity from the context, I also specify load options to load Role List, and then detach each role from the context. On the client I add Role entities to the User.RoleList collection, then Attach User entity to the context and SubmitChanges. But new roles are not added.

Is there a complete example that shows adding/removing to/from such lists and then submitting changes to the parent entity?

  • Post Points: 35
Verified Answer
All Replies
Page 1 of 1 (4 items)