Exemplo n.º 1
0
        public void UpdateProfile(string userName, ProfileDto profile)
        {
            if (userName == null)
            {
                throw new ArgumentNullException(nameof(userName));
            }
            if (profile == null)
            {
                throw new ArgumentNullException(nameof(profile));
            }

            var existedProfile = _profileProvider.GetProfileByUserName(userName);

            existedProfile.Website     = profile.Website;
            existedProfile.Bio         = profile.Bio;
            existedProfile.PhoneNumber = profile.PhoneNumber;
            existedProfile.FullName    = profile.FullName;

            _profileProvider.Update(existedProfile);
        }