Ejemplo n.º 1
0
        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)));
        }
Ejemplo n.º 2
0
 public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
 {
     try
     {
         var commands = _repository.GetAllCommands();
         return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commands)));
     }
     catch (Exception)
     {
         return(NotFound());
     }
 }
Ejemplo n.º 3
0
        public ActionResult <IEnumerable <CommandReadDto> > GetAllCommands()
        {
            var commands = _repository.GetAllCommands();

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

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

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

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