コード例 #1
0
        public JsonPatchDocument <ApiAirTransportRequestModel> CreatePatch(ApiAirTransportRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiAirTransportRequestModel>();

            patch.Replace(x => x.FlightNumber, model.FlightNumber);
            patch.Replace(x => x.HandlerId, model.HandlerId);
            patch.Replace(x => x.Id, model.Id);
            patch.Replace(x => x.LandDate, model.LandDate);
            patch.Replace(x => x.PipelineStepId, model.PipelineStepId);
            patch.Replace(x => x.TakeoffDate, model.TakeoffDate);
            return(patch);
        }
コード例 #2
0
        public virtual ApiAirTransportRequestModel MapResponseToRequest(
            ApiAirTransportResponseModel response)
        {
            var request = new ApiAirTransportRequestModel();

            request.SetProperties(
                response.FlightNumber,
                response.HandlerId,
                response.Id,
                response.LandDate,
                response.PipelineStepId,
                response.TakeoffDate);
            return(request);
        }
コード例 #3
0
        public virtual ApiAirTransportResponseModel MapRequestToResponse(
            int airlineId,
            ApiAirTransportRequestModel request)
        {
            var response = new ApiAirTransportResponseModel();

            response.SetProperties(airlineId,
                                   request.FlightNumber,
                                   request.HandlerId,
                                   request.Id,
                                   request.LandDate,
                                   request.PipelineStepId,
                                   request.TakeoffDate);
            return(response);
        }