-1

Please Help I am new to Asp.net Identity, this is asp.net core 2 web api , I am trying to register a user to my ASPNETUSER Table , and i successfully created new fields (FirstName,LastName,Address).

Newly Added Fields

the problem is whenever i try to map my input to the new fields , it does not even show the newly added fields as prop ... but it shows (i.e Id,AccessfailedCount,Concurrency Stamps....)

This is my AccountController

This is my Class Where ApplicationUser is defined Student Context Class

I Then Tried Using ApplicationUser Instead Of IdentityUser This Time I see all the prop(both my ApplicationUser And Identity User)..but then On running it i get this error enter image description here

Thanks.

1 Answers1

0

Your problem is that you are creating an IdentityUser instance instead of an instance of the ApplicationUser class that extends IdentityUser.

See this post: How to extend IdentityUser with custom property

jlavallet
  • 1,267
  • 1
  • 12
  • 33