コード例 #1
0
        public static BusinessUserManager Create(IdentityFactoryOptions <BusinessUserManager> options, IOwinContext context)
        {
            IdentityDbContextAplicacao db = context.Get <IdentityDbContextAplicacao>();

            BusinessUserManager manager = new BusinessUserManager(new UserStore <BusinessUser>(db));

            return(manager);
        }
コード例 #2
0
        public static MvcHtmlString GetUserName(this HtmlHelper html, string id)
        {
            BusinessUserManager mgr = HttpContext.Current.GetOwinContext().GetUserManager <BusinessUserManager>();

            return(new MvcHtmlString(mgr.FindByIdAsync(id).Result.UserName));
        }