public GetMachineMasterResponseDto GetMachineMaster()
        {
            GetMachineMasterResponseDto getMachineMasterResponseDto;

            try
            {
                getMachineMasterResponseDto = rMachineMasterProvider.GetMachineMaster();
                getMachineMasterResponseDto.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                getMachineMasterResponseDto = new GetMachineMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                getMachineMasterResponseDto = new GetMachineMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(getMachineMasterResponseDto);
        }
        public GetMachineMasterResponseDto GetMachineMaster()
        {
            var response = new GetMachineMasterResponseDto();

            var cModel = new GetMachineMasterCM()
            {
                //PageIndex = getMachineMasterRequestDto.PageIndex,
                //PageSize = getMachineMasterRequestDto.PageSize,
                //MachineCode = getMachineMasterRequestDto.MachineCode
            };

            var model = machineMastersRepository.GetMachineMaster();

            if (model != null && model.GetMachineMasterList.Any())
            {
                response             = MachineMasterMapper((List <MachineMasterModel>)model.GetMachineMasterList, response);
                response.RecordCount = model.RecordCount;
            }

            return(response);
        }
        private GetMachineMasterResponseDto MachineMasterMapper(List <MachineMasterModel> list, GetMachineMasterResponseDto response)
        {
            Mapper.CreateMap <MachineMasterModel, MachineMasterList>();
            response.MachineMasterList =
                Mapper.Map <List <MachineMasterModel>, List <MachineMasterList> >(list);

            return(response);
        }