public void BeforeEachTestAfterBase() { var context = new IdentityContext(Users); var userStore = new UserStore<ExtendedIdentityUser>(context); _Manager = new UserManager<ExtendedIdentityUser>(userStore); _User = new ExtendedIdentityUser { UserName = "******" }; }
public void BeforeEachTestAfterBase() { var context = new IdentityContext(Users, Roles); var roleStore = new RoleStore<ExtendedIdentityRole>(context); _Manager = new RoleManager<ExtendedIdentityRole>(roleStore); _Role = new ExtendedIdentityRole { Name = "admin" }; }
public void BeforeEachTest() { var client = new MongoClient("mongodb://localhost:27017"); Database = client.GetServer().GetDatabase("identity-testing"); Users = Database.GetCollection<IdentityUser>("users"); Roles = Database.GetCollection<IdentityRole>("roles"); IdentityContext = new IdentityContext(Users, Roles); Database.DropCollection("users"); Database.DropCollection("roles"); }
public UserStore(IdentityContext context) { _Context = context; }
public RoleStore(IdentityContext context) { _Context = context; }