Adding and you may Removing Profiles off Title Positions

Adding and you may Removing Profiles off Title Positions

Run your project and go to the create role URL – Once you do a task you might be redirected the fresh List Look at which shows all Spots regarding the Label Databases.

The Index View will have a remove key through which an Identity Role can be removed from the database. Check the below image:

A checkbox is provided with against each customer’s term, and you may through this checkbox users is extra otherwise taken from this new selected role

Now I will create a functionality to Add or Remove Users from Identity Roles. For implementing this functionality add 2 classes called RoleEdit.cs and RoleModification.cs inside the Habits folder. The codes of these classes are given below.

The RoleEdit category can be used so you’re able to depict the fresh new Role plus the details of the newest Pages who will be on the part or not regarding part.

I will now use these 2 classes to add or remove users from a role. For this I will add an Update action to the Character Control.

The HTTP GET version of the Update Action method is used to fetch participants and you can low-members of a selected Identity Role. While the HTTP POST version of the Update Action method is used for including or removing users from an Identity Role.