예제 #1
0
        public async Task <ActionResult> Disassociate(string loginProvider, string providerKey)
        {
            UserManager = new CUserManager(new CUserStore(UnitOfWork));
            ManageMessageId?message = null;
            IdentityResult  result  = await UserManager.RemoveLoginAsync(User.Identity.GetUserId <int>(), new UserLoginInfo(loginProvider, providerKey));

            if (result.Succeeded)
            {
                message = ManageMessageId.RemoveLoginSuccess;
            }
            else
            {
                message = ManageMessageId.Error;
            }
            return(RedirectToAction("Manage", new { Message = message }));
        }