public async Task <ActionResult> UpdateProjectMemberRole(ProjectMemberDto updatingDto)
        {
            try
            {
                var updatingProjectMember = _mapper.Map <ProjectMemberDto, ProjectMemberModel>(updatingDto);
                await _projectMembersManager.UpdateProjectMebmerRoleAsync(updatingProjectMember);

                return(Ok("Success"));
            }
            catch (VersionsNotMatchException vme)
            {
                return(Conflict(vme.Message));
            }
            catch (NotFoundException nfe)
            {
                return(NotFound(nfe.Message));
            }
        }
        public async Task <ActionResult <ProjectMemberAggregate> > AddMemberToProject([FromBody] ProjectMemberDto projectMemberDto)
        {
            if (!Request.Headers.TryGetValue(Constants.RequestIdHeaderName, out StringValues requestIdValue))
            {
                return(BadRequest($"{Constants.RequestIdHeaderName} header must be specified!"));
            }

            string requestId = requestIdValue.ToString();

            var creatingMember = _mapper.Map <ProjectMemberDto, ProjectMemberModel>(projectMemberDto);

            try
            {
                await _projectMembersManager.AddMemberToProjectAsync(creatingMember, requestId);

                return(Ok("Success"));
            }
            catch (AlreadyHandledException ahe)
            {
                return(Accepted(ahe.Message));
            }
            catch (NotFoundException nfe)
            {
                return(NotFound(nfe.Message));
            }
            catch (EntityExistsException e)
            {
                return(BadRequest(e.Message));
            }
        }