public async Task <ActionResult <Result <PersonVm> > > GetPersonsList()
        {
            var query       = new GetPersonsListQuery();
            var personsList = await _mediatR.Send(query);

            return(Ok(personsList));
        }
예제 #2
0
        public async Task <ActionResult <PersonListVM> > GetAll(GetPersonsListQuery query)
        {
            var result = await Mediator.Send(query);

            return(result);
        }
        public async Task <Result <List <PersonVm> > > Handle(GetPersonsListQuery request, CancellationToken cancellationToken)
        {
            var personList = await _personRepository.GetAllAsync();

            return(Ok(_mapper.Map <List <PersonVm> >(personList)));
        }