Example #1
0
        public JsonPatchDocument <ApiUserRequestModel> CreatePatch(ApiUserRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiUserRequestModel>();

            patch.Replace(x => x.BioImgUrl, model.BioImgUrl);
            patch.Replace(x => x.Birthday, model.Birthday);
            patch.Replace(x => x.ContentDescription, model.ContentDescription);
            patch.Replace(x => x.Email, model.Email);
            patch.Replace(x => x.FullName, model.FullName);
            patch.Replace(x => x.HeaderImgUrl, model.HeaderImgUrl);
            patch.Replace(x => x.Interest, model.Interest);
            patch.Replace(x => x.LocationLocationId, model.LocationLocationId);
            patch.Replace(x => x.Password, model.Password);
            patch.Replace(x => x.PhoneNumber, model.PhoneNumber);
            patch.Replace(x => x.Privacy, model.Privacy);
            patch.Replace(x => x.Username, model.Username);
            patch.Replace(x => x.Website, model.Website);
            return(patch);
        }
Example #2
0
        public virtual ApiUserRequestModel MapResponseToRequest(
            ApiUserResponseModel response)
        {
            var request = new ApiUserRequestModel();

            request.SetProperties(
                response.BioImgUrl,
                response.Birthday,
                response.ContentDescription,
                response.Email,
                response.FullName,
                response.HeaderImgUrl,
                response.Interest,
                response.LocationLocationId,
                response.Password,
                response.PhoneNumber,
                response.Privacy,
                response.Username,
                response.Website);
            return(request);
        }