public GetInstrumentMasterResponseDto GetInstrumentMaster() { GetInstrumentMasterResponseDto getInstrumentMasterResponseDto; try { getInstrumentMasterResponseDto = rInstrumentMasterProvider.GetInstrumentMaster(); getInstrumentMasterResponseDto.ServiceResponseStatus = 1; } catch (SSException applicationException) { getInstrumentMasterResponseDto = new GetInstrumentMasterResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { getInstrumentMasterResponseDto = new GetInstrumentMasterResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(getInstrumentMasterResponseDto); }
public GetInstrumentMasterResponseDto GetInstrumentMaster() { var response = new GetInstrumentMasterResponseDto(); var cModel = new GetInstrumentMasterCM() { //PageIndex = getInstrumentMasterRequestDto.PageIndex, //PageSize = getInstrumentMasterRequestDto.PageSize, //InstrumentCode = getInstrumentMasterRequestDto.InstrumentCode }; var model = instrumentMastersRepository.GetInstrumentMaster(); if (model != null && model.GetInstrumentMasterList.Any()) { response = InstrumentMasterMapper((List <InstrumentMasterModel>)model.GetInstrumentMasterList, response); response.RecordCount = model.RecordCount; } return(response); }
private GetInstrumentMasterResponseDto InstrumentMasterMapper(List <InstrumentMasterModel> list, GetInstrumentMasterResponseDto response) { Mapper.CreateMap <InstrumentMasterModel, InstrumentMasterList>(); response.InstrumentMasterList = Mapper.Map <List <InstrumentMasterModel>, List <InstrumentMasterList> >(list); return(response); }