public GetVendorMasterResponseDto GetVendorMaster()
        {
            GetVendorMasterResponseDto response;

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

            return(response);
        }
        public GetVendorMasterResponseDto GetVendorMaster()
        {
            var response = new GetVendorMasterResponseDto();
            //var cModel = new GetVendorMasterCM
            //{
            //    PageIndex = getVendorMasterRequestDto.PageIndex,
            //    PageSize = getVendorMasterRequestDto.PageSize,
            //    UserId = getVendorMasterRequestDto.UserId
            //};

            var model = vendorMastersRepository.GetVendorMaster();

            if (model != null && model.VendorMasterList.Any())
            {
                response             = VendorMasterMapper((List <VendorMasterModel>)model.VendorMasterList, response);
                response.RecordCount = model.RecordCount;
            }

            return(response);
        }
        private static GetVendorMasterResponseDto VendorMasterMapper(List <VendorMasterModel> list, GetVendorMasterResponseDto getVendorMasterResponseDto)
        {
            Mapper.CreateMap <VendorMasterModel, VendorMaster>();
            getVendorMasterResponseDto.VendorMasterList =
                Mapper.Map <List <VendorMasterModel>, List <VendorMaster> >(list);

            return(getVendorMasterResponseDto);
        }