コード例 #1
0
        public JsonPatchDocument <ApiFamilyRequestModel> CreatePatch(ApiFamilyRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiFamilyRequestModel>();

            patch.Replace(x => x.Note, model.Note);
            patch.Replace(x => x.PrimaryContactEmail, model.PrimaryContactEmail);
            patch.Replace(x => x.PrimaryContactFirstName, model.PrimaryContactFirstName);
            patch.Replace(x => x.PrimaryContactLastName, model.PrimaryContactLastName);
            patch.Replace(x => x.PrimaryContactPhone, model.PrimaryContactPhone);
            return(patch);
        }
コード例 #2
0
        public virtual ApiFamilyRequestModel MapResponseToRequest(
            ApiFamilyResponseModel response)
        {
            var request = new ApiFamilyRequestModel();

            request.SetProperties(
                response.Note,
                response.PrimaryContactEmail,
                response.PrimaryContactFirstName,
                response.PrimaryContactLastName,
                response.PrimaryContactPhone);
            return(request);
        }