public ActionResult <IEnumerable <Command> > GetAllCommands()
        {
            var commandItems = _repository.GetAllCommands();

            //return Ok(_mapper.Map<IEnumerable<Command>>(commandItems));
            return(Ok(_mapper.Map <IEnumerable <CommandReadDto> >(commandItems)));
        }
Пример #2
0
        public ActionResult <IEnumerable <WebApiModel> > GetAllCommands()
        {
            var CommandItems = _repository.GetAllCommands();

            var response = _mapper.Map <IEnumerable <WebApiReadDto> >(CommandItems);

            return(Ok(response));
        }