Example #1
0
        public async Task <ApiResponse> GetAllDivisions()
        {
            var divisions = await _divisionRepo.FindAllDivisions();

            if (divisions == null)
            {
                return(new ApiResponse(404));
            }
            var divisionTransferDTOs = _mapper.Map <IEnumerable <DivisionTransferDTO> >(divisions);

            return(new ApiOkResponse(divisionTransferDTOs));
        }