This project has moved. For the latest updates, please go here.

Thrown exception when testing IdentityDbContext from Microsoft.AspNet.Identity.EntityFramework.dll

Apr 24, 2015 at 11:32 AM
I'm trying to test a class using IdentityDbContext<T> implemented in Microsoft.AspNet.Identity.EntityFramework.dll

I'm Implement IdentityDbContext<T>

public partial class AuthDbContext : IdentityDbContext<User>, IDisposable
public AuthDbContext()
    : base("DefaultConnection", throwIfV1Schema: false)

//This constructor is used in tests
public AuthDbContext(DbConnection connection)
    : base(connection, true)

public static AuthDbContext Create()
    return new AuthDbContext();

void IDisposable.Dispose()


When my test using this context, effort thrown exception

System.Data.Entity.Core.EntityCommandExecutionException : An error occurred while executing the command definition. See the inner exception for details.
---- Effort.Exceptions.EffortException : Table 'AspNetUsers' was not found. The database was probably not initialized.

The real name of the table AspNetUsers, is default IdentityDbContext configuration, but IdentityDbContext property referenced to this tabla "Users"

I'm trying set table name attribute for User class and fluent api

Why effort not create fake table AspNetUsers ?
Sep 26, 2015 at 5:23 PM
Did you manage to resolve this? Can someone post an example of using Effort with IdentityDbContext

Any help would be greatly appreciated