Тип сущности ApplicationUser не является частью модели для текущего контекста Asp.Net MVC

Ниже необходим код для моей заявки. Я получаю ошибку, указанную выше в моем файле Account Controller. Я использую встроенный счет регистрации и код входа в MVC 4. Невозможно зарегистрировать пользователя. Я видел ссылку ниже на stackoverflow, чтобы решить мою ошибку, но не смог ее решить

Ссылка, по которой я следовал

Мои строки подключения в My Web.Config Code

  <connectionStrings>
 <add name="PromoteMyNameEntities1" connectionString="metadata=res://*/PromoteDB.csdl|res://*/PromoteDB.,ssdl|res://*/PromoteDB.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=Dell-PC\SQLEXPRESS;initial catalog=PromoteMyName;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

 <add name="DefaultConnection" connectionString="data source=Dell-PC\SQLEXPRESS;initial catalog=PromoteMyName;integrated security=True;" providerName="System.Data.SqlClient" />

 <connectionStrings>

Файл IdentityModel.cs

using System.Data.Entity;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;

namespace PromoteMyName.Models
{
    // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
    public class ApplicationUser : IdentityUser
    {
        public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
        {
            // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
            var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
            // Add custom user claims here
            return userIdentity;
        }
    }

    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public ApplicationDbContext()
            : base("DefaultConnection", throwIfV1Schema: false)
        {
        }

        public static ApplicationDbContext Create()
        {
            return new ApplicationDbContext();
        }
    }
}

Мой файл DbContent

public partial class PromoteMyNameEntities1 : DbContext
    {
        public PromoteMyNameEntities1()
            : base("name=PromoteMyNameEntities1")
        {
        }

AccountController.CS (Ошибка в этом файле)

 // POST: /Account/Register
    [HttpPost]
    [AllowAnonymous]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> Register(RegisterViewModel model)
    {
        if (ModelState.IsValid)
        {
            var user = new ApplicationUser { UserName = model.Email, Email = model.Email };

  //Getting Error at Line Below
            var result = await UserManager.CreateAsync(user, model.Password);
            if (result.Succeeded)
            {
                await SignInManager.SignInAsync(user, isPersistent:false, rememberBrowser:false);

                // For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=320771
                // Send an email with this link
                // string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id);
                // var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
                // await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking <a href=\"" + callbackUrl + "\">here</a>");

                return RedirectToAction("BusinessCategory", "ClientBusinesses");
            }
            AddErrors(result);
        }

        // If we got this far, something failed, redisplay form
        return View(model);
    }

Ответы на вопрос(1)

Ваш ответ на вопрос