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))); }
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))); }
public ActionResult <IEnumerable <CommandReadDto> > GetallCommands() { return(Ok(mapper.Map <IEnumerable <CommandReadDto> >(repository.GetAllCommands()))); }
public ActionResult <IEnumerable <Command> > GetAllCommands() { var items = repository.GetAllCommands(); return(Ok(this.mapper.Map <IEnumerable <CommandReadDto> >(items))); }
public ActionResult <IEnumerable <CommandReadDTO> > GetAllCommands() { var commands = _repo.GetAllCommands(); return(Ok(_mapper.Map <IEnumerable <CommandReadDTO> >(commands))); }
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))); }