Extend IdentityUser in ASP NET Core



I will show you how to extend IdentityUser in asp.net core...


  • 1.Create a new class "ApplicationUser" that will Inherits from IdentityUser class.

Using Microsoft.AspNetCore.Identity;

public class ApplicationUser : IdentityUser
{


}

  • 2.add properties you need to extend the ApplicationUser class.

Using Microsoft.AspNetCore.Identity;

public class ApplicationUser : IdentityUser
{
public string FirstName { get; set; }

public string LastName { get; set; }

}


إرسال تعليق

أحدث أقدم