Ejemplo n.º 1
0
        public async Task <ApiResponse> GetAllOffices()
        {
            var offices = await _officeRepo.FindAllOffices();

            if (offices == null)
            {
                return(new ApiResponse(404));
            }
            var officeTransferDTOs = _mapper.Map <IEnumerable <OfficeTransferDTO> >(offices);

            return(new ApiOkResponse(officeTransferDTOs));
        }