Пример #1
0
        public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
        {
            _logger.LogInformation("Get All Commands Call");
            var commandItems = _repository.GetAllCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commandItems)));
        }
Пример #2
0
        public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
        {
            var commandItems = _repository.GetAllCommands();

            // Return an IEnumerable of the mapped Dto, not the IEnumerable returned by the db query
            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commandItems)));
        }
Пример #3
0
        public ActionResult <IEnumerable <CommandReadDTO> > GetAllCommands()
        {
            var commandItems = _repository.GetAllCommands();

            if (commandItems != null)
            {
                return(Ok(_mapper.Map <IEnumerable <CommandReadDTO> >(commandItems)));
            }
            return(NotFound());
        }
Пример #4
0
        public ActionResult <IEnumerable <CommandDto> > GetAllCommands()
        {
            var commands = _commanderRepository.GetAllCommands();
            var retVal   = commands.Select(c => new CommandDto
            {
                Id    = c.Id,
                HowTo = c.HowTo,
                Line  = c.Line
            });

            return(retVal.ToList());
        }
Пример #5
0
        public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
        {
            var commandItems = _repository.GetAllCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commandItems)));
        }
Пример #6
0
 public ActionResult <IEnumerable <CommandReadDto> > GetallCommands()
 {
     return(Ok(mapper.Map <IEnumerable <CommandReadDto> >(repository.GetAllCommands())));
 }
Пример #7
0
        public ActionResult <IEnumerable <Command> > GetAllCommands()
        {
            var items = repository.GetAllCommands();

            return(Ok(this.mapper.Map <IEnumerable <CommandReadDto> >(items)));
        }
Пример #8
0
        public ActionResult <IEnumerable <CommandReadDTO> > GetAllCommands()
        {
            var commands = _repo.GetAllCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDTO> >(commands)));
        }
Пример #9
0
        public ActionResult <IEnumerable <Command> > GetAllCommands()
        {
            var commandItems = _commanderRepository.GetAllCommands();

            return(Ok(commandItems));
        }
Пример #10
0
        public ActionResult <IEnumerable <CommandReadDto> > GetCommands()
        {
            var allCommands = _commanderRepository.GetAllCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(allCommands)));
        }