public async Task <IActionResult> OnPostDeleteAsync(int[] ids)
        {
            foreach (var id in ids)
            {
                var mpAccount = await _mpAccountService.GetObjectAsync(z => z.Id == id);

                if (mpAccount != null)
                {
                    await _mpAccountService.DeleteObjectAsync(mpAccount);

                    await AccessTokenContainer.RemoveFromCacheAsync(mpAccount.AppId);//Çå³ý×¢²á״̬
                }
            }
            return(RedirectToPage("./Index", new { Uid }));
        }
Beispiel #2
0
        public async Task <IActionResult> OnPostDeleteAsync(int[] ids)
        {
            var mpId = 0;

            foreach (var id in ids)
            {
                var weixinUser = await _weixinUserService.GetObjectAsync(z => z.Id == id);

                if (weixinUser != null)
                {
                    mpId = weixinUser.MpAccountId;
                    await _weixinUserService.DeleteObjectAsync(weixinUser);
                }
            }
            return(RedirectToPage("./Index", new { Uid, mpId }));
        }