public static BusinessUserManager Create(IdentityFactoryOptions <BusinessUserManager> options, IOwinContext context) { IdentityDbContextAplicacao db = context.Get <IdentityDbContextAplicacao>(); BusinessUserManager manager = new BusinessUserManager(new UserStore <BusinessUser>(db)); return(manager); }
public static MvcHtmlString GetUserName(this HtmlHelper html, string id) { BusinessUserManager mgr = HttpContext.Current.GetOwinContext().GetUserManager <BusinessUserManager>(); return(new MvcHtmlString(mgr.FindByIdAsync(id).Result.UserName)); }