public JsonPatchDocument <ApiClaspRequestModel> CreatePatch(ApiClaspRequestModel model) { var patch = new JsonPatchDocument <ApiClaspRequestModel>(); patch.Replace(x => x.NextChainId, model.NextChainId); patch.Replace(x => x.PreviousChainId, model.PreviousChainId); return(patch); }
public virtual ApiClaspRequestModel MapResponseToRequest( ApiClaspResponseModel response) { var request = new ApiClaspRequestModel(); request.SetProperties( response.NextChainId, response.PreviousChainId); return(request); }
public virtual ApiClaspResponseModel MapRequestToResponse( int id, ApiClaspRequestModel request) { var response = new ApiClaspResponseModel(); response.SetProperties(id, request.NextChainId, request.PreviousChainId); return(response); }