Typ encji nie jest częścią modelu, EF 5

Próbuję zaktualizować moje repozytorium do EF5, ale napotkałem kilka błędów. Rozejrzałem się dookoła stosu w poszukiwaniu podobnych błędów, odkryłem kilka pytań / odpowiedzi, ale niestety te same odpowiedzi nie rozwiązały mojego problemu.

To jest mój błąd:

The entity type User is not part of the model for the current context.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

To jest moja klasa DbContext:

public abstract class WebModelContext : DbContext
{
    public WebModelContext()
        : base("WebConnection")
    {
        Configuration.LazyLoadingEnabled = true;
    }
}

To jest moja klasa kontekstu, która dziedziczy mojąWebModelContext klasa:

public class AccountContext : WebModelContext
{
    private DbSet<User> _users;

    public AccountContext()
        : base()
    {
        _users = Set<User>();
    }

    public DbSet<User> Users
    {
        get { return _users; }
    }
}

To jest moja klasa repozytorium:

public abstract class IRepository<T> : IDisposable where T : WebModelContext, new()
{
    private T _context;

    protected T Context
    {
        get { return _context; }
    }

    public IRepository() {
        _context = new T();
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    ~IRepository() 
    {
        Dispose(false);
    }

    protected virtual void Dispose(bool disposing)
    {
        if (disposing) 
        {
            if (_context != null)
            {
                _context.Dispose();
                _context = null;
            }
        }
    }

}

To jest moja klasa kontaRepository:

public class AccountRepository : IRepository<AccountContext>
{
    public List<User> GetUsers()
    {
        return Context.Users.ToList();
    }

    public User GetUser(string username)
    {
        return Context.Users.Where(u => u.Name == username).FirstOrDefault();
    }

    public User CreateUser(string username, string password, string salt, int age, int residence)
    {
        User user = new User
        {
            Name = username,
            Password = password,
            Salt = salt,
            RoleId = 1,
            CreatedOn = DateTime.Now,
            Locked = false,
            Muted = false,
            Banned = false,
            Guid = Guid.NewGuid().ToString("N")
        };
        Context.Users.Add(user);
        return Context.SaveChanges() > 0 ? user : null;
    }
}

Każda pomoc bardzo doceniana :)

questionAnswers(3)

yourAnswerToTheQuestion