Пример #1
0
        public virtual ApiCommunityActionTemplateRequestModel MapResponseToRequest(
            ApiCommunityActionTemplateResponseModel response)
        {
            var request = new ApiCommunityActionTemplateRequestModel();

            request.SetProperties(
                response.ExternalId,
                response.JSON,
                response.Name);
            return(request);
        }
Пример #2
0
        public virtual ApiCommunityActionTemplateResponseModel MapRequestToResponse(
            string id,
            ApiCommunityActionTemplateRequestModel request)
        {
            var response = new ApiCommunityActionTemplateResponseModel();

            response.SetProperties(id,
                                   request.ExternalId,
                                   request.JSON,
                                   request.Name);
            return(response);
        }
Пример #3
0
        public JsonPatchDocument <ApiCommunityActionTemplateRequestModel> CreatePatch(ApiCommunityActionTemplateRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiCommunityActionTemplateRequestModel>();

            patch.Replace(x => x.ExternalId, model.ExternalId);
            patch.Replace(x => x.JSON, model.JSON);
            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }