Exemple #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);
 }
Exemple #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);
        }
Exemple #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);
     }
 }
Exemple #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);
            }
        }
Exemple #5
0
 public UserStore(SomeDb db) : base(db)
 {
 }
Exemple #6
0
 public RoleStore(SomeDb db) : base(db)
 {
 }