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

            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commandItems)));
        }
        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)));
        }
Exemple #3
0
        public ActionResult <IEnumerable <CommandReadDTO> > GetAllCommands()
        {
            var commandItems = _repository.GetAllCommands();

            if (commandItems != null)
            {
                return(Ok(_mapper.Map <IEnumerable <CommandReadDTO> >(commandItems)));
            }
            return(NotFound());
        }
        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());
        }
        public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
        {
            var commandItems = _repository.GetAllCommands();

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

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

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

            return(Ok(commandItems));
        }
        public ActionResult <IEnumerable <CommandReadDto> > GetCommands()
        {
            var allCommands = _commanderRepository.GetAllCommands();

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