Example #1
0
        public async Task ReplaceTagsAsync(Guid entityId, string collectionString)
        {
            var tagIds = collectionString.ParseStringCollection(Guid.Parse).ToList();
            var tags   = _userTagProvider.Get(tagIds);

            await _userTagService.ReplaceAsync(entityId, tagIds);

            _userTagIndex.Update(entityId, tags.Select(t => t.Text));
        }
Example #2
0
        public async Task Edit(ProfileEditModel editModel)
        {
            var newMedias = _mediaHelper.CreateMedia(editModel, MediaFolderTypeEnum.MembersContent).ToArray();

            var member = editModel.Map <UpdateMemberDto>();

            member.NewMedia = newMedias.Length > 0
                ? newMedias.First()
                : default(int?);

            await _userTagService.ReplaceAsync(editModel.Id, editModel.TagIdsData);

            await _intranetMemberService.UpdateAsync(member);
        }