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

            patch.Replace(x => x.PersonName, model.PersonName);
            return(patch);
        }
예제 #2
0
        public virtual ApiVPersonRequestModel MapResponseToRequest(
            ApiVPersonResponseModel response)
        {
            var request = new ApiVPersonRequestModel();

            request.SetProperties(
                response.PersonName);
            return(request);
        }
예제 #3
0
        public virtual ApiVPersonResponseModel MapRequestToResponse(
            int personId,
            ApiVPersonRequestModel request)
        {
            var response = new ApiVPersonResponseModel();

            response.SetProperties(personId,
                                   request.PersonName);
            return(response);
        }