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

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

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

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