示例#1
0
        public static IUserManager Create()
        {
            //var db = new IdentityDbContext<IdentityUser>("DefaultConnection");
            //var store = new UserStore<IdentityUser>(db);
            //var mgr = new Microsoft.AspNet.Identity.UserManager<IdentityUser>(store);
            //return new Thinktecture.IdentityManager.AspNetIdentity.UserManager<IdentityUser>(mgr, db);

            var db    = new CustomDbContext("CustomAspId");
            var store = new CustomUserStore(db);
            var mgr   = new CustomUserManager(store);

            return(new Thinktecture.IdentityManager.AspNetIdentity.UserManager <CustomUser, int, CustomUserLogin, CustomUserRole, CustomUserClaim>(mgr, db));
        }
示例#2
0
文件: Custom.cs 项目: retslig/ANDP
 public CustomUserStore(CustomDbContext ctx)
     : base(ctx)
 {
 }