Last post Jul 03, 2017 08:47 AM by Eric Du
Jul 01, 2017 01:06 PM|explosiveskull|LINK
I have two tables employee and role i want to pick an employee from table employee and assign a role suppose a use "abc" is assigned the role of developer in the company. Can anyone tell me how to do that i have also created a employeetorole table to store
the information about the employee and if in future i want to update the role of the employee i can do it by updating the employeetorole table...
Jul 01, 2017 01:29 PM|mgebhard|LINK
Consider using the built-in Individual Account project in Visual Studio. This template has everything you need to create users and roles using ASP Identity.
After you create the template, take a moment to open the Manage and Account controllers from the default template. These controller contain source code that show how to add use the SignInManager and UserManager to do basic functions.
The UserManager provides services for adding user, roles, and adding users to roles.
Also see getting started with Identity.
Jul 03, 2017 08:47 AM|Eric Du|LINK
According to your description, as far as I know, you could use identity to implement this, here are two tutorials about how to implement it, please check:
ASP.NET Identity 2.0: Customizing Users and Roles:
ASP.NET MVC 5 Security And Creating User Role: