Пример #1
0
        public async Task <int> UpdateLevel(DtoGetUserProfile profile, byte newLvl)
        {
            var map = _mapper.Map <UserProfiles>(profile);

            map.UserLevel = newLvl;
            return(await _userProfileRepository.Update(map));
        }
Пример #2
0
        /// <summary>
        /// Kişisel görüşü günceller.
        /// </summary>
        /// <param name="profile"></param>
        /// <param name="opinion"></param>
        /// <returns></returns>
        public async Task <int> UpdatePersonalOpinion(DtoGetUserProfile profile, string opinion)
        {
            var map = _mapper.Map <UserProfiles>(profile);

            map.PersonalOpinion = opinion;
            return(await _userProfileRepository.Update(map));
        }
Пример #3
0
        /// <summary>
        /// Avatarın yolunu günceller.
        /// </summary>
        /// <param name="profile"></param>
        /// <param name="avatarPath"></param>
        /// <returns></returns>
        public async Task <int> UpdateAvatarPath(DtoGetUserProfile profile, string avatarPath)
        {
            var map = _mapper.Map <UserProfiles>(profile);

            map.AvatarPath = avatarPath;
            return(await _userProfileRepository.Update(map));
        }
Пример #4
0
        /// <summary>
        /// Kullanıcının tecrübe puanını günceller.
        /// </summary>
        /// <param name="profile"></param>
        /// <param name="score"></param>
        /// <returns></returns>
        public async Task <int> UpdateExperienceScore(DtoGetUserProfile profile, sbyte score)
        {
            var map = _mapper.Map <UserProfiles>(profile);

            map.ExperienceScore = map.ExperienceScore + score;
            return(await _userProfileRepository.Update(map));
        }
Пример #5
0
        /// <summary>
        /// Son görüntülenen sayfayı ve zamanını günceller.
        /// </summary>
        /// <param name="userprofile"></param>
        /// <param name="LastPage"></param>
        /// <returns></returns>
        public async Task <int> UpdateLastViewedPage(DtoGetUserProfile userprofile, string LastPage)
        {
            var map = _mapper.Map <UserProfiles>(userprofile);

            map.LastPageViewed         = LastPage;
            map.LastPageViewedDateTime = DateTime.Now;
            return(await _userProfileRepository.Update(map));
        }
Пример #6
0
        /// <summary>
        /// Profili günceller.
        /// </summary>
        /// <param name="profile"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public async Task <int> UpdateProfile(DtoGetUserProfile profile, DtoUpdateUserProfile user)
        {
            var map = _mapper.Map <UserProfiles>(profile);

            map.Gender           = user.Gender;
            map.City             = user.City;
            map.DateOfBirth      = user.DateOfBirth;
            map.FacebookProfile  = user.FacebookProfile;
            map.InstagramProfile = user.InstagramProfile;
            map.Job            = user.Job;
            map.Name           = user.Name;
            map.Surname        = user.Surname;
            map.TwitterProfile = user.TwitterProfile;
            return(await _userProfileRepository.Update(map));
        }