Search code examples
c#asp.net-identity

ASP.NET Identity how to extend User?


I'm trying to create a class which extends the user. The project I'm working on will have two main users, with the second type of user requiring all the same fields as the first plus a few extra. I figured inheritance would be the best way to do this but I'm not sure how to do this using ASP.NET Identity (as this is the first time I've used it).

Basically what I'm trying to do is:

public class UserTypeTwo : User
{
    //additional fields go here
}

Everywhere I look has pretty much only touched on how to add more fields to the user, but not how to extend it to make a second user type. Is this possible with ASP.NET Identity?


Solution

  • @Edward's comment worked. I extended ApplicationUser.

    public class UserTypeTwo : ApplicationUser