How to change type of id in Microsoft.AspNet.Identity.EntityFramework.IdentityUser

后端 未结 5 883
既然无缘
既然无缘 2020-11-27 10:44

(ASP.NET MVC 5, EF6, VS2013)

I\'m trying to figure out how to change the type of the \"Id\" field from string to int in the type:

Mi         


        
5条回答
  •  庸人自扰
    2020-11-27 11:29

    Basically you have to :

    -Change the type of the key to int in the Identity user class
    -Add customized Identity classes that use int as key
    -Change the context class and user manager to use int as key
    -Change start-up configuration to use int as key
    -Change the AccountController to pass int as key

    here is link where all steps are explained to achieve this.

提交回复
热议问题