TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mikulas Luckanic
NA
5
2.6k
How to add role to user in default database created by mvc
Nov 4 2015 1:48 PM
How can I convert this:
RoleManager<IdentityRole> roleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(new IdentityDbContext()));
UserManager<ApplicationUser> userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()));
roleManager.Create(new IdentityRole(RoleName));
ApplicationUser user = userManager.FindByEmail(UserName);
userManager.AddToRole(user.Id, RoleName);
to two dropdown lists and one button?
I want add role to user in default database. Thx
asp.net
Reply
Answers (
5
)
how to enter math. equation in text box
Display data in mvc