Skip to content

ashgadala/AspNetExtendingIdentityRoles

 
 

Repository files navigation

ASP.NET Extending Identity Roles

This is an example project to accompany a blog post describing how to extend the AspNet.Identity.EntityFramework.IdentityRole class as implemented in the ASP.NET MVC 5 Identity system.

This project builds upon the foundation created by another example, ASP.NET Role-Based Security Example, covered in the article Extending Identity Accounts and Implementing Role-Based Authentication in ASP.NET MVC 5. You can see in the commit history the basic steps taken to move from the previous project structure to one where I have added some very basic extensions to the IdentityRole class.

In the previous article, we discuss the relative ease with which the IdentityUser class may be extended to add additional properties, and the implementation of very basic role management. Unlike IdentityUser, extension of the IdentityRole class requires a bit more effort, a little insight into the internals of the ASP.NET 5 Identity system, and a few work-arounds.

You will need to enable Nuget Package Restore in Visual Studio in order to download and restore Nuget packages during build. If you are not sure how to do this, see Keep Nuget Packages Out of Source Control with Nuget Package Manager Restore

You will also need to run Entity Framework Migrations Update-Database command per the article. The migration files are included in the repo, so you will NOT need to Enable-Migrations or run Add-Migration Init.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 78.9%
  • JavaScript 13.5%
  • HTML 6.5%
  • Other 1.1%