AspNet.Identity.PostgreSQL
AspNet.Identity.PostgreSQL copied to clipboard
The type or namespace name 'IdentityUserLogin' could not be found
MVC 5.2.3 AspNet.WebApi 5.2.3
Visual Studio 2015 Community Edition
Error --------------------- foreach (IdentityUserLogin linkedAccount in user.Logins)----------------------
The above section in the below code inside "Controllers\AccountController.CS" shows an error "The type or namespace name 'IdentityUserLogin' could not be found "
------------------- Controllers\AccountController.CS -- GetManageInfo() -------------------
// GET api/Account/ManageInfo?returnUrl=%2F&generateState=true
[Route("ManageInfo")]
public async Task<ManageInfoViewModel> GetManageInfo(string returnUrl, bool generateState = false)
{
IdentityUser user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
if (user == null)
{
return null;
}
List<UserLoginInfoViewModel> logins = new List<UserLoginInfoViewModel>();
foreach (IdentityUserLogin linkedAccount in user.Logins)
{
logins.Add(new UserLoginInfoViewModel
{
LoginProvider = linkedAccount.LoginProvider,
ProviderKey = linkedAccount.ProviderKey
});
}