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