Ejemplo n.º 1
0
 public IntegrationTest()
 {
     var context = new SomeDb("name=Default");
     _db = new TestDb();
     UserStore = new UserStore(context);
     RoleStore = new RoleStore(context);
     Environment = new FakeApplicationEnvironment();
     RoleProvider = new FlexRoleProvider(RoleStore);
     MembershipProvider = new FlexMembershipProvider(UserStore, Environment);
 }
Ejemplo n.º 2
0
        public IntegrationTest()
        {
            var context = new SomeDb("name=Default");

            _db                = new TestDb();
            UserStore          = new UserStore(context);
            RoleStore          = new RoleStore(context);
            Environment        = new FakeApplicationEnvironment();
            RoleProvider       = new FlexRoleProvider(RoleStore);
            MembershipProvider = new FlexMembershipProvider(UserStore, Environment);
        }
Ejemplo n.º 3
0
 static void UseEntityFrameworkToCreateDatabase()
 {
     Database.Delete("Default");
     Database.SetInitializer(new MigrateDatabaseToLatestVersion<SomeDb, Configuration>("Default"));
     var context = new SomeDb("name=Default");
     var users = context.Users.ToList();
     var roles = context.Roles.ToList();
     foreach(var role in roles)
     {
         context.Roles.Remove(role);
     }
     foreach(var user in users)
     {
         context.Users.Remove(user);
     }
 }
Ejemplo n.º 4
0
        static void UseEntityFrameworkToCreateDatabase()
        {
            Database.Delete("Default");
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <SomeDb, Configuration>("Default"));
            var context = new SomeDb("name=Default");
            var users   = context.Users.ToList();
            var roles   = context.Roles.ToList();

            foreach (var role in roles)
            {
                context.Roles.Remove(role);
            }
            foreach (var user in users)
            {
                context.Users.Remove(user);
            }
        }
Ejemplo n.º 5
0
 public UserStore(SomeDb db) : base(db)
 {
 }
Ejemplo n.º 6
0
 public RoleStore(SomeDb db) : base(db)
 {
 }