Could not find IdentityUser namespace name

I keep getting this error for the last two frameworks that I have included. I searched up and down. I can’t understand what it is. I installed NuGet packages and tried to recompile several times. Nothing works. Here is my code.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using IdentityUser;
using IdentityDbContext;

namespace UserProfileInfo.Models
{
    public class UserProfile : IdentityUser
    {
        public virtual UserProfile UserInfo { get; set; }
    }

    public class UserProfileDB
    {
        public int Id { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
    }
    public class MyDbContext : IdentityDbContext<UserProfile>
    {
        public MyDbContext()
            : base("DefaultConnection")
        {

        }
        public System.Data.Entity.DbSet<UserProfile> UserInfo { get; set; }
    }
}
+4
source share
1 answer

Not necessary -

using IdentityUser;
using IdentityDbContext;

Instead, you need to add the following -

using Microsoft.AspNet.Identity.EntityFramework;

Make sure you have this DLL as a link, as shown below. If it is not available, you can get this nuget from here .

enter image description here

+11
source

Source: https://habr.com/ru/post/1525906/


All Articles