public ActionResult <IEnumerable <CommandReadDto> > GetCommands()
        {
            var commandItems = _repoistory.GetCommands();

            return(Ok(
                       _mapper.Map <IEnumerable <CommandReadDto> >(commandItems)
                       ));
        }
示例#2
0
        public ActionResult <IEnumerable <CommandReadDTO> > GetAllCommands()
        {
            var commandItems = _repository.GetCommands();

            if (commandItems != null)
            {
                return(Ok(_mapper.Map <IEnumerable <CommandReadDTO> >(commandItems)));
            }

            return(NotFound());
        }
 public ActionResult <IEnumerable <Command> > GetAllCommands()
 {
     try
     {
         var commondItems = _commanderRepo.GetCommands();
         if (commondItems != null)
         {
             return(Ok(commondItems));
         }
         return(NotFound());
     }
     catch (System.Exception)
     {
         throw;
     }
 }
示例#4
0
        public ActionResult <IEnumerable <CommandReadDTO> > GetAllCommands()
        {
            var data = _command_repo.GetCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDTO> >(data)));
        }
 // GET: CommanderController
 public ActionResult Index()
 {
     return(View(_repo.GetCommands()));
 }
示例#6
0
        public ActionResult <IEnumerable <CommandDto> > GetCommands()
        {
            var commands = _repo.GetCommands();

            return(Ok(_map.Map <IEnumerable <CommandDto> >(commands)));
        }
        public ActionResult <IEnumerable <Command> > GetAllCommands()
        {
            var commands = _commanderRepo.GetCommands();

            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commands)));
        }
示例#8
0
 public ActionResult <IEnumerable <CommandRest> > GetCommands() => Ok(_repository.GetCommands());