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

            patch.Replace(x => x.DisplayName, model.DisplayName);
            patch.Replace(x => x.EmailAddress, model.EmailAddress);
            patch.Replace(x => x.ExternalId, model.ExternalId);
            patch.Replace(x => x.ExternalIdentifiers, model.ExternalIdentifiers);
            patch.Replace(x => x.IdentificationToken, model.IdentificationToken);
            patch.Replace(x => x.IsActive, model.IsActive);
            patch.Replace(x => x.IsService, model.IsService);
            patch.Replace(x => x.JSON, model.JSON);
            patch.Replace(x => x.Username, model.Username);
            return(patch);
        }
Esempio n. 2
0
        public virtual ApiUserRequestModel MapResponseToRequest(
            ApiUserResponseModel response)
        {
            var request = new ApiUserRequestModel();

            request.SetProperties(
                response.DisplayName,
                response.EmailAddress,
                response.ExternalId,
                response.ExternalIdentifiers,
                response.IdentificationToken,
                response.IsActive,
                response.IsService,
                response.JSON,
                response.Username);
            return(request);
        }