public IssueStateDto Create(IssueStateDto IssueStateDTO)
        {
            var IssueState = _mapper.Map <IssueState>(IssueStateDTO);

            _issueStateRepository.Create(IssueState);
            _issueStateRepository.SaveChanges();
            return(IssueStateDTO);
        }
Beispiel #2
0
        public IActionResult Update(IssueStateDto issueStateDTO)
        {
            var updatedIssueState = _issueStateService.Update(issueStateDTO);

            if (updatedIssueState == null)
            {
                return(StatusCode(500));
            }

            return(Ok(updatedIssueState));
        }
Beispiel #3
0
        public IActionResult Create(IssueStateDto issueStateDto)
        {
            var createdIssueState = _issueStateService.Create(issueStateDto);

            if (createdIssueState == null)
            {
                return(StatusCode(500));
            }

            return(Ok(createdIssueState));
        }
 public IssueStateDto Update(IssueStateDto IssueStateDTO)
 {
     _issueStateRepository.Update(_mapper.Map <IssueState>(IssueStateDTO));
     _issueStateRepository.SaveChanges();
     return(_mapper.Map <IssueStateDto>(_issueStateRepository.FindById(IssueStateDTO.Id)));
 }