예제 #1
0
        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);
        }
예제 #2
0
        public virtual ApiSelfReferenceRequestModel MapResponseToRequest(
            ApiSelfReferenceResponseModel response)
        {
            var request = new ApiSelfReferenceRequestModel();

            request.SetProperties(
                response.SelfReferenceId,
                response.SelfReferenceId2);
            return(request);
        }
예제 #3
0
        public virtual ApiSelfReferenceResponseModel MapRequestToResponse(
            int id,
            ApiSelfReferenceRequestModel request)
        {
            var response = new ApiSelfReferenceResponseModel();

            response.SetProperties(id,
                                   request.SelfReferenceId,
                                   request.SelfReferenceId2);
            return(response);
        }