コード例 #1
0
        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);
        }
コード例 #2
0
        public virtual ApiClaspRequestModel MapResponseToRequest(
            ApiClaspResponseModel response)
        {
            var request = new ApiClaspRequestModel();

            request.SetProperties(
                response.NextChainId,
                response.PreviousChainId);
            return(request);
        }
コード例 #3
0
        public virtual ApiClaspResponseModel MapRequestToResponse(
            int id,
            ApiClaspRequestModel request)
        {
            var response = new ApiClaspResponseModel();

            response.SetProperties(id,
                                   request.NextChainId,
                                   request.PreviousChainId);
            return(response);
        }