//получить определенный айди из таблицы public ActionResult <SecondTableDTO> GetCommandById2(int id) { var commandItem = _repository.GetCommandById2(id); if (commandItem != null) { return(Ok(_mapper.Map <SecondTableDTO>(commandItem))); } return(NotFound()); }