public async Task <AcceptMemberResponse> Handle(AcceptMemberRequest request, CancellationToken cancellationToken) { var member = await groupManager.AcceptMember(request.GroupId, request.UserId, request.Accept); return(new AcceptMemberResponse { Member = request.Accept ? mapper.Map <GroupMemberDto>(member) : null }); }