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

            patch.Replace(x => x.Notes, model.Notes);
            patch.Replace(x => x.PcEmail, model.PcEmail);
            patch.Replace(x => x.PcFirstName, model.PcFirstName);
            patch.Replace(x => x.PcLastName, model.PcLastName);
            patch.Replace(x => x.PcPhone, model.PcPhone);
            patch.Replace(x => x.StudioId, model.StudioId);
            return(patch);
        }
Esempio n. 2
0
        public virtual ApiFamilyRequestModel MapResponseToRequest(
            ApiFamilyResponseModel response)
        {
            var request = new ApiFamilyRequestModel();

            request.SetProperties(
                response.Notes,
                response.PcEmail,
                response.PcFirstName,
                response.PcLastName,
                response.PcPhone,
                response.StudioId);
            return(request);
        }