Beispiel #1
0
        public static AdminUser ToEntity(this AdminUserDto dto)
        {
            AdminUser entity = null;

            if (dto != null)
            {
                entity = new AdminUser()
                {
                    Account    = dto.Account,
                    Code       = dto.Code,
                    CreateDate = dto.CreateDate,
                    ID         = dto.ID,
                    Img        = dto.Img,
                    Name       = dto.Name,
                    Password   = dto.Password,
                    Phone      = dto.Phone,
                    PhoneCode  = dto.PhoneCode,
                    QQ         = dto.QQ
                };
            }
            return(entity);
        }
Beispiel #2
0
        public static AdminUserDto ToDto(this AdminUser entity)
        {
            AdminUserDto dto = null;

            if (entity != null)
            {
                dto = new AdminUserDto()
                {
                    Account    = entity.Account,
                    Code       = entity.Code,
                    CreateDate = entity.CreateDate,
                    ID         = entity.ID,
                    Img        = entity.Img,
                    Name       = entity.Name,
                    Password   = entity.Password,
                    Phone      = entity.Phone,
                    PhoneCode  = entity.PhoneCode,
                    QQ         = entity.QQ
                };
            }
            return(dto);
        }