Ejemplo n.º 1
0
        public JsonPatchDocument <ApiLifecycleRequestModel> CreatePatch(ApiLifecycleRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiLifecycleRequestModel>();

            patch.Replace(x => x.DataVersion, model.DataVersion);
            patch.Replace(x => x.JSON, model.JSON);
            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
Ejemplo n.º 2
0
        public virtual ApiLifecycleRequestModel MapResponseToRequest(
            ApiLifecycleResponseModel response)
        {
            var request = new ApiLifecycleRequestModel();

            request.SetProperties(
                response.DataVersion,
                response.JSON,
                response.Name);
            return(request);
        }
Ejemplo n.º 3
0
        public virtual ApiLifecycleResponseModel MapRequestToResponse(
            string id,
            ApiLifecycleRequestModel request)
        {
            var response = new ApiLifecycleResponseModel();

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