예제 #1
0
 /// <summary>
 /// 转换为用户名实体
 /// </summary>
 /// <param name="po">用户名持久化对象</param>
 public static Users ToEntity(this UsersPo po)
 {
     if (po == null)
     {
         return(null);
     }
     return(po.MapTo(new Users(po.Id)));
 }
예제 #2
0
 /// <summary>
 /// 转换为用户名实体
 /// </summary>
 /// <param name="po">用户名持久化对象</param>
 private static Users ToEntity2(this UsersPo po)
 {
     if (po == null)
     {
         return(null);
     }
     return(new Users(po.Id)
     {
         Name = po.Name,
         NickName = po.NickName,
         Email = po.Email,
         PasswordVersion = po.PasswordVersion,
         Password = po.Password,
         Description = po.Description,
         IsSystemAdministrator = po.IsSystemAdministrator,
         CreationTime = po.CreationTime,
         CreatId = po.CreatId,
         LastModifiTime = po.LastModifiTime,
         LastModifiId = po.LastModifiId,
         IsDeleted = po.IsDeleted,
         Version = po.Version,
     });
 }