public ActionResult <IEnumerable <string> > GetAllCommands() { var allCommands = _repository.GetAllCommands(); //return Ok(allCommands); return(new string[] { "value1", "value2" }); }
public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands() { // var commandItems = repository.GetAllCommands(); var mockRepo = new MockCommanderRepo(); var commandItems = mockRepo.GetAllCommands(); var commandReadDtos = mapper.Map <IEnumerable <CommandReadDto> >(commandItems); return(Ok(commandReadDtos)); }
public ActionResult <IEnumerable <Command> > GetAllCommands() { var commandItems = _repository.GetAllCommands(); return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commandItems))); }
[HttpGet] // GET /api/commands public ActionResult <IEnumerable <Command> > GetAllCommands() { var commandItems = _repository.GetAllCommands(); return(Ok(commandItems)); }