public GetToolsMasterResponseDto GetToolsMaster()
        {
            GetToolsMasterResponseDto getToolsMasterResponseDto;

            try
            {
                getToolsMasterResponseDto = rToolsMasterProvider.GetToolsMaster();
                getToolsMasterResponseDto.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                getToolsMasterResponseDto = new GetToolsMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                getToolsMasterResponseDto = new GetToolsMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(getToolsMasterResponseDto);
        }
        public GetToolsMasterResponseDto GetToolsMaster()
        {
            var response = new GetToolsMasterResponseDto();

            var cModel = new GetToolsMasterCM()
            {
                //PageIndex = getToolsMasterRequestDto.PageIndex,
                //PageSize = getToolsMasterRequestDto.PageSize,
                //ToolsCode = getToolsMasterRequestDto.ToolCode
            };

            var model = toolsMastersRepository.GetToolsMaster(cModel);

            if (model != null && model.GetToolsMasterList.Any())
            {
                response             = ToolsMasterMapper((List <ToolsMasterModel>)model.GetToolsMasterList, response);
                response.RecordCount = model.RecordCount;
            }

            return(response);
        }
        //public GetMaterialMasterResponseDto GetMaterialMaster(GetMaterialMasterRequestDto getMaterialMasterRequestDto)
        //{
        //    var response = new GetMaterialMasterResponseDto();
        //    var cModel = new GetMaterialMasterCM
        //    {
        //        PageIndex = getMaterialMasterRequestDto.PageIndex,
        //        PageSize = getMaterialMasterRequestDto.PageSize,
        //        MaterialCode = getMaterialMasterRequestDto.MaterialCode
        //    };
        //    var model = materialMastersRepository.GetMaterialMaster(cModel);

        //    if (model != null && model.MaterialMasterList.Any())
        //    {
        //        response = MaterialMasterMapper((List<MaterialMasterModel>)model.MaterialMasterList, response);
        //    }

        //    return response;
        //}

        private static GetToolsMasterResponseDto ToolsMasterMapper(List <ToolsMasterModel> list, GetToolsMasterResponseDto getToolsMasterResponseDto)
        {
            Mapper.CreateMap <ToolsMasterModel, ToolsMaster>();
            getToolsMasterResponseDto.ToolsMasterList =
                Mapper.Map <List <ToolsMasterModel>, List <ToolsMaster> >(list);

            return(getToolsMasterResponseDto);
        }