예제 #1
0
        public ResponseBag <IEnumerable <EPatrimonio> > GetAll()
        {
            var entities = _repository.GetAll();

            return(new ResponseBag <IEnumerable <EPatrimonio> >
            {
                Ok = true,
                ObjectResponse = entities
            });
        }
예제 #2
0
        public async Task <ActionResult <IEnumerable <PatrimonioViewModel> > > Get()
        {
            var patrimonioViewModel = _mapper.Map <IEnumerable <PatrimonioViewModel> >(await _patrimonioRepository.GetAll());

            return(CustomResponse(patrimonioViewModel));
        }