public GPTypeMasterResponseDto getGPTypeMaster()
        {
            GPTypeMasterResponseDto gpTypeMasterResponseDto;

            try
            {
                gpTypeMasterResponseDto = reportGatePass.getGPTypeMaster();
                gpTypeMasterResponseDto.ServiceResponseStatus = 1;
            }
            catch (SSException exception)
            {
                gpTypeMasterResponseDto = new GPTypeMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = exception.Message,
                    ErrorCode             = exception.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                gpTypeMasterResponseDto = new GPTypeMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(gpTypeMasterResponseDto);
        }
        public GPTypeMasterResponseDto getGPTypeMaster()
        {
            var response = new GPTypeMasterResponseDto();
            var model    = gatePassRepository.getGPTypeMaster();

            if (model != null)
            {
                response = GPTypeMasterMapper((List <GPTypeMasterResponseModel>)model.gpTypeList, response);
            }

            return(response);
        }
        private static GPTypeMasterResponseDto GPTypeMasterMapper(List <GPTypeMasterResponseModel> list, GPTypeMasterResponseDto response)
        {
            Mapper.CreateMap <GPTypeMasterResponseModel, GPTypeMasterResponse>();
            response.gpTypeList =
                Mapper.Map <List <GPTypeMasterResponseModel>, List <GPTypeMasterResponse> >(list);

            return(response);
        }