protected virtual UpdateMemberDto MapToMemberDTO(ProfileEditModel model)
        {
            var newMedias = _mediaHelper.CreateMedia(model).ToList();

            var updateMember = model.Map <UpdateMemberDto>();

            updateMember.NewMedia = newMedias.Count > 0 ? newMedias.First() : default(int?);

            return(updateMember);
        }
Example #2
0
        protected virtual IntranetUserDTO MapToUserDTO(ProfileEditModel model)
        {
            var newMedias = _mediaHelper.CreateMedia(model).ToList();

            var updateUser = model.Map <IntranetUserDTO>();

            updateUser.NewMedia = newMedias.Count > 0 ? newMedias.First() : default(int?);

            return(updateUser);
        }
Example #3
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);
        }