如何将“ApplicationUser”移动到域项目?
How to move `ApplicationUser` to a domain project?
我希望将生成的模板 ApplicationUser
移动到另一个数据层项目。我在这里读了很多答案,只是说 "just move it",但我不知道他们的作者是如何错过房间里的大象 GenerateUserIdentityAsync
:
public class ApplicationUser : IdentityUser
{
public virtual async Task<ClaimsIdentity> GenerateUserIdentityAsync(ApplicationUserManager manager)
{
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
return userIdentity;
}
}
这取决于 ApplicationUserManager
,如果没有循环依赖,我无法进入我的领域项目。
更新答案:
所以我建议从结果中解析信息并将您的自定义对象传递给您的项目
谢谢。
我希望将生成的模板 ApplicationUser
移动到另一个数据层项目。我在这里读了很多答案,只是说 "just move it",但我不知道他们的作者是如何错过房间里的大象 GenerateUserIdentityAsync
:
public class ApplicationUser : IdentityUser
{
public virtual async Task<ClaimsIdentity> GenerateUserIdentityAsync(ApplicationUserManager manager)
{
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
return userIdentity;
}
}
这取决于 ApplicationUserManager
,如果没有循环依赖,我无法进入我的领域项目。
更新答案: 所以我建议从结果中解析信息并将您的自定义对象传递给您的项目
谢谢。