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

            if (commandItem != null)
            {
                return(Ok(_mapper.Map <CommandReadDto>(commandItem)));
            }
            return(NotFound());
        }
        public ActionResult <string> GetCommandById(int id)
        {
            var commandItem = _repository.GetCommandById(id);

            //return Ok(commandItem);
            return("Something else");
        }
        public ActionResult <Command> GetCommandById(int id)
        {
            var commandItem = _repository.GetCommandById(id);

            return(Ok(commandItem));
        }