예제 #1
0
        public JsonPatchDocument <ApiAirlineRequestModel> CreatePatch(ApiAirlineRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiAirlineRequestModel>();

            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
예제 #2
0
		public virtual ApiAirlineRequestModel MapResponseToRequest(
			ApiAirlineResponseModel response)
		{
			var request = new ApiAirlineRequestModel();
			request.SetProperties(
				response.Name);
			return request;
		}
예제 #3
0
		public virtual ApiAirlineResponseModel MapRequestToResponse(
			int id,
			ApiAirlineRequestModel request)
		{
			var response = new ApiAirlineResponseModel();
			response.SetProperties(id,
			                       request.Name);
			return response;
		}