From 8fc0b124e03808c7893e1c869dd468055cfd5eb5 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Thu, 7 Feb 2019 14:53:55 +0300 Subject: [PATCH] BlogUser cleanup and add Update method --- .../Volo/Blogging/Users/BlogUser.cs | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Users/BlogUser.cs b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Users/BlogUser.cs index 56f8287b19..0ae80c8d42 100644 --- a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Users/BlogUser.cs +++ b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Users/BlogUser.cs @@ -1,12 +1,10 @@ using System; -using System.Collections.Generic; -using Volo.Abp.Data; using Volo.Abp.Domain.Entities; using Volo.Abp.Users; namespace Volo.Blogging.Users { - public class BlogUser : AggregateRoot, IUser, IHasExtraProperties + public class BlogUser : AggregateRoot, IUser { public virtual Guid? TenantId { get; protected set; } @@ -24,16 +22,14 @@ namespace Volo.Blogging.Users public virtual bool PhoneNumberConfirmed { get; protected set; } - public virtual Dictionary ExtraProperties { get; protected set; } - protected BlogUser() { - ExtraProperties = new Dictionary(); + } public BlogUser(IUserData user) + : base(user.Id) { - Id = user.Id; Email = user.Email; Name = user.Name; Surname = user.Surname; @@ -42,8 +38,17 @@ namespace Volo.Blogging.Users PhoneNumberConfirmed = user.PhoneNumberConfirmed; UserName = user.UserName; TenantId = user.TenantId; + } - ExtraProperties = new Dictionary(); + public void Update(IUserData user) + { + Email = user.Email; + Name = user.Name; + Surname = user.Surname; + EmailConfirmed = user.EmailConfirmed; + PhoneNumber = user.PhoneNumber; + PhoneNumberConfirmed = user.PhoneNumberConfirmed; + UserName = user.UserName; } } }