Example #1
0
        protected virtual async Task RemoveUserInfoAsync(IdentityUser identityUser)
        {
            var userInfo = await _userInfoRepository.FindAsync(x => x.UserId == identityUser.Id);

            if (userInfo != null)
            {
                await _userInfoRepository.DeleteAsync(userInfo, true);
            }
        }
        public async Task DelUserModel(List <UserInput> model)
        {
            foreach (var item in model)
            {
                long id = Convert.ToInt64(item.ID);
                //删除用户时跳过当前登录用户
                if (id != AbpSession.UserId)
                {
                    await _userInfoRepository.DeleteAsync(id);

                    //清除缓存
                    _cacheManagerExtens.RemoveUserInfoCache(id);
                }
            }
        }