public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
        {
            var commandList = _repository.GetAllCommands();

            if (commandList != null)
            {
                return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commandList)));
            }

            return(NotFound());
        }
示例#2
0
        public ActionResult <IEnumerable <CommandItem> > Get()
        {
            var commands = _repository.GetAllCommands();

            return(Ok(commands));
        }