public ActionResult <CommandReadDto> GetCommandById(int id)
        {
            var commandItem = _repository.GetCommandById(id);

            if (commandItem != null)
            {
                return(Ok(_mapper.Map <CommandReadDto>(commandItem)));
            }
            return(NotFound());
        }
예제 #2
0
        public ActionResult <WebApiModel> GetCommandById(int id)
        {
            var CommandItem = _repository.GetCommandById(id);

            if (CommandItem != null)
            {
                return(Ok(_mapper.Map <WebApiReadDto>(CommandItem)));
            }
            return(NotFound());
        }