public IdentityDbContext CreateContext(bool delete = false) { var db = DbUtil.Create <IdentityDbContext>(_fixture.ConnectionString); if (delete) { db.Database.EnsureDeleted(); } db.Database.EnsureCreated(); return(db); }
private CustomDbContext <TKey> GetContext <TKey>() where TKey : IEquatable <TKey> { return(DbUtil.Create <CustomDbContext <TKey> >(_fixture.Connection)); }