public async Task <ActionResult <IEnumerable <CommandReadDto> > > GetAllCommands()
        {
            IEnumerable <Command> commands = await _repository.GetAllCommands();

            if (commands.Count() < 1)
            {
                return(NotFound());
            }
            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commands)));
        }
Exemplo n.º 2
0
 public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
 {
     try
     {
         var commands = _repository.GetAllCommands();
         return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commands)));
     }
     catch (Exception)
     {
         return(NotFound());
     }
 }
        public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
        {
            var commands = _repository.GetAllCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commands)));
        }
Exemplo n.º 4
0
        public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
        {
            var commandItems = _repository.GetAllCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commandItems))); // 200 success in postman
        }
Exemplo n.º 5
0
        public ActionResult <IEnumerable <CommandReadDto> > GetAppCommands()
        {
            var items = _commandRepo.GetAllCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(items)));
        }
Exemplo n.º 6
0
 public IActionResult Index()
 {
     return(View(new IndexViewModel {
         commands = _repo.GetAllCommands()
     }));
 }
Exemplo n.º 7
0
        public ActionResult <IEnumerable <CommandDtoRead> > GetAllCommands()
        {
            var commandItems = _repo.GetAllCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandDtoRead> >(commandItems)));
        }