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

            patch.Replace(x => x.JSON, model.JSON);
            return(patch);
        }
Example #2
0
        public virtual ApiConfigurationRequestModel MapResponseToRequest(
            ApiConfigurationResponseModel response)
        {
            var request = new ApiConfigurationRequestModel();

            request.SetProperties(
                response.JSON);
            return(request);
        }
Example #3
0
        public virtual ApiConfigurationResponseModel MapRequestToResponse(
            string id,
            ApiConfigurationRequestModel request)
        {
            var response = new ApiConfigurationResponseModel();

            response.SetProperties(id,
                                   request.JSON);
            return(response);
        }