public ActionResult <CommandReadDTO> GetCommandById(Guid id) { var commandItem = _repository.GetCommandById(id); if (commandItem != null) { return(Ok(_mapper.Map <CommandReadDTO>(commandItem))); } return(NotFound()); }
public ActionResult <CommandReadDto> GetCommandById(int id) { var command = _mapper.Map <CommandReadDto>(_commandRepository.GetCommandById(id)); if (command == null) { return(NotFound()); } return(Ok(command)); }
public ActionResult <CommandReadDto> GetCommandsById(int Id) { var commandItem = _commandRepository.GetCommandById(Id); if (commandItem != null) { return(Ok(_mapper.Map <CommandReadDto>(commandItem))); } return(NotFound()); }
public ActionResult <CommandReadDto> GetCommandById(int id) { var result = _commandRepository.GetCommandById(id); if (result != null) { return(Ok(_mapper.Map <CommandReadDto>(result))); } return(NotFound()); }
public ActionResult <CommandReadDto> GetCommandById(int id) { var commandItem = _repository.GetCommandById(id); if (commandItem != null) { // return Ok(commandItem); var commandItemDtoMapped = _mapper.Map <CommandReadDto>(commandItem); return(Ok(commandItemDtoMapped)); } return(NotFound()); }
public ActionResult <CommandReadDTO> GetCommandById(int id) { var commandItem = _ICommand.GetCommandById(id); if (commandItem != null) { return(Ok(_mapper.Map <CommandReadDTO>(commandItem))); } else { return(NotFound()); // 404 Not Found } }
public ActionResult<Command> GetCommantById(int id) { var command = repository.GetCommandById(id); if (command == null) { return NotFound(); } return Ok(command); }
public ActionResult <Command> GetCommandById(int id) { return(Ok(_repo.GetCommandById(id))); }
public Command GetCommandById(Guid id) { return(_commandRepository.GetCommandById(id)); }