コード例 #1
0
        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));
        }