Esempio n. 1
0
        public JsonPatchDocument <ApiVPersonRequestModel> CreatePatch(ApiVPersonRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiVPersonRequestModel>();

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

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

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