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

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

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

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