Example #1
0
        public IHttpActionResult PatchProfile(UserProfileInfo model)
        {
            model.UserId = CurrentUserId;
            var entity = _userProfileService.Find(CurrentUserId);

            entity.InjectFrom(new LoopInjection(new[] { "PhotoId" }), model);

            _userProfileService.Update(entity);
            _userProfileService.Commit();

            var profile = new UserProfileInfo();

            profile.InjectFrom(entity);

            return(Ok());
        }