Creating roles in asp net core



Creating roles in asp.net core using the ASP.NET Core Identity API.

RoleManager in ASP.NET Core

Text version of the video
https://csharp-video-tutorials.blogspot.com/2019/07/creating-roles-in-aspnet-core.html

Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.
https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation=1

Slides
https://csharp-video-tutorials.blogspot.com/2019/07/creating-roles-in-aspnet-core-slides.html

ASP.NET Core Text Articles & Slides
https://csharp-video-tutorials.blogspot.com/2019/01/aspnet-core-tutorial-for-beginners.html

ASP.NET Core Tutorial
https://www.youtube.com/playlist?list=PL6n9fhu94yhVkdrusLaQsfERmL_Jh4XmU

Angular, JavaScript, jQuery, Dot Net & SQL Playlists
https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd

To create a user in asp.net core we use UserManager class. Similarly, to create a role, we use RoleManager class provided by asp.net core.

The built-in IdentityRole class represnts a Role.

RoleManager class performs all the CRUD operations i.e Creating, Reading, Updating and Deleting roles from the underlying database table AspNetRoles

To tell the RoleManager class to work with IdentityRole class, we specify IdentityRole class as the generic argument to RoleManager

RoleManager is made available to any controller or view by asp.net core dependency injection system

Comments are closed.