public GetDcMasterResponseDto GetDcMaster() { GetDcMasterResponseDto response = new GetDcMasterResponseDto(); try { response = rDeliveryChallanProvider.GetDcMaster(); response.ServiceResponseStatus = 1; } catch (SSException applicationException) { response = new GetDcMasterResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { response = new GetDcMasterResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(response); }
public GetDcMasterResponseDto GetDcMaster() { GetDcMasterResponseDto response = new GetDcMasterResponseDto(); var model = deliveryChallanRepository.GetDcMaster(); if (model != null) { response = DcMasterMapper((List <GetDcMasterModel>)model.GetDcMasterModelList, response); } return(response); }
private static GetDcMasterResponseDto DcMasterMapper(List <GetDcMasterModel> list, GetDcMasterResponseDto getDcMasterResponseDto) { Mapper.CreateMap <GetDcMasterModel, GetDcMasterResponseModel>(); getDcMasterResponseDto.GetDcMasterResponseModelList = Mapper.Map <List <GetDcMasterModel>, List <GetDcMasterResponseModel> >(list); return(getDcMasterResponseDto); }