public virtual ApiOtherTransportServerResponseModel MapServerRequestToResponse( int id, ApiOtherTransportServerRequestModel request) { var response = new ApiOtherTransportServerResponseModel(); response.SetProperties(id, request.HandlerId, request.PipelineStepId); return(response); }
public virtual ApiOtherTransportServerResponseModel MapEntityToModel( OtherTransport item) { var model = new ApiOtherTransportServerResponseModel(); model.SetProperties(item.Id, item.HandlerId, item.PipelineStepId); if (item.HandlerIdNavigation != null) { var handlerIdModel = new ApiHandlerServerResponseModel(); handlerIdModel.SetProperties( item.HandlerIdNavigation.Id, item.HandlerIdNavigation.CountryId, item.HandlerIdNavigation.Email, item.HandlerIdNavigation.FirstName, item.HandlerIdNavigation.LastName, item.HandlerIdNavigation.Phone); model.SetHandlerIdNavigation(handlerIdModel); } if (item.PipelineStepIdNavigation != null) { var pipelineStepIdModel = new ApiPipelineStepServerResponseModel(); pipelineStepIdModel.SetProperties( item.PipelineStepIdNavigation.Id, item.PipelineStepIdNavigation.Name, item.PipelineStepIdNavigation.PipelineStepStatusId, item.PipelineStepIdNavigation.ShipperId); model.SetPipelineStepIdNavigation(pipelineStepIdModel); } return(model); }