public GetEmployeeMasterResponseDto GetEmployeeMaster()
        {
            GetEmployeeMasterResponseDto response;

            try
            {
                response = rEmployeeMasterProvider.GetEmployeeMaster();
                response.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                response = new GetEmployeeMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                response = new GetEmployeeMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(response);
        }
        public GetEmployeeMasterResponseDto GetEmployeeMaster()
        {
            var response = new GetEmployeeMasterResponseDto();

            var model = employeeMastersRepository.GetEmployeeMaster();

            if (model != null)
            {
                response             = EmployeeMasterMapper((List <EmployeeMasterModel>)model.EmployeeMasterList, response);
                response.RecordCount = model.RecordCount;
            }

            return(response);
        }
        private static GetEmployeeMasterResponseDto EmployeeMasterMapper(List <EmployeeMasterModel> list, GetEmployeeMasterResponseDto getEmployeeMasterResponseDto)
        {
            Mapper.CreateMap <EmployeeMasterModel, EmployeeMasterResponse>();
            getEmployeeMasterResponseDto.EmployeeMasterResponseList =
                Mapper.Map <List <EmployeeMasterModel>, List <EmployeeMasterResponse> >(list);

            return(getEmployeeMasterResponseDto);
        }