public JsonPatchDocument <ApiSelfReferenceRequestModel> CreatePatch(ApiSelfReferenceRequestModel model) { var patch = new JsonPatchDocument <ApiSelfReferenceRequestModel>(); patch.Replace(x => x.SelfReferenceId, model.SelfReferenceId); patch.Replace(x => x.SelfReferenceId2, model.SelfReferenceId2); return(patch); }
public virtual ApiSelfReferenceRequestModel MapResponseToRequest( ApiSelfReferenceResponseModel response) { var request = new ApiSelfReferenceRequestModel(); request.SetProperties( response.SelfReferenceId, response.SelfReferenceId2); return(request); }
public virtual ApiSelfReferenceResponseModel MapRequestToResponse( int id, ApiSelfReferenceRequestModel request) { var response = new ApiSelfReferenceResponseModel(); response.SetProperties(id, request.SelfReferenceId, request.SelfReferenceId2); return(response); }