Click here to Skip to main content
13,447,852 members (52,587 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i am new in mvc3.
I have 3 tables for role model:

and I want to apply one user to multiple role like user id =1 and given role 1.taskcreate, 2.taskupdate, 3.create company account how can i perform User.IsInRole() condition with this roles.

thank you.
Posted 1-Apr-12 18:14pm
Updated 14-Apr-12 1:20am
Peace ON 2-Apr-12 2:45am
<pre> tag is not required for your question.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can do it easily.

Just assign multiple roles to one user in role_group_master table.

role_group_id role_id user_id
1 10 52
2 22 52
3 33 52

Hope this help!
member60 14-Apr-12 7:54am
my 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.180318.3 | Last Updated 14 Apr 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100