コード例 #1
0
        public async Task <IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken)
        {
            if (user != null)
            {
                int deleteResult = await userTable.Delete(user, cancellationToken);

                if (deleteResult > 0)
                {
                    return(IdentityResult.Success);
                }
                else
                {
                    return(IdentityResult.Failed(new IdentityError()
                    {
                        Code = deleteResult.ToString(), Description = "Error during user deletion"
                    }));
                }
            }
            else
            {
                return(IdentityResult.Failed(new IdentityError()
                {
                    Code = "404", Description = "User is null"
                }));
            }
        }
コード例 #2
0
ファイル: UserProcessor.cs プロジェクト: furkaneergun/Website
 public async Task DeleteUser(string userid)
 {
     await _userTable.Delete(userid);
 }