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

            patch.Replace(x => x.AppliedOn, model.AppliedOn);
            patch.Replace(x => x.Description, model.Description);
            return(patch);
        }
Beispiel #2
0
        public virtual ApiVersionInfoRequestModel MapResponseToRequest(
            ApiVersionInfoResponseModel response)
        {
            var request = new ApiVersionInfoRequestModel();

            request.SetProperties(
                response.AppliedOn,
                response.Description);
            return(request);
        }
Beispiel #3
0
        public virtual ApiVersionInfoResponseModel MapRequestToResponse(
            long version,
            ApiVersionInfoRequestModel request)
        {
            var response = new ApiVersionInfoResponseModel();

            response.SetProperties(version,
                                   request.AppliedOn,
                                   request.Description);
            return(response);
        }