Hi! everyone.

I have a Class as follows:
    public class Region : INotifyPropertyChanged
    {
        private int _id;
        public virtual int ID
        {
            get
            {
                return _id;
            }
            set
            {
                if (value != _id)
                {
                    _id = value;
                    PropChanged();
                }
            }
        }

        private string _no;
        public virtual string NO
        {
            get
            {
                return _no;
            }
            set
            {
                if (value != _no)
                {
                    _no = value;
                    PropChanged();
                }
            }
        }

        private string _desc;
        public virtual string Description
        {
            get
            {
                return _desc;
            }
            set
            {
                if (value != _desc)
                {
                    _desc = value;
                    PropChanged();
                }
            }
        }

        private bool _en;
        public virtual bool En
        {
            get
            {
                return _en;
            }
            set
            {
                if (value != _en)
                {
                    _en = value;
                    PropChanged();
                }
            }
        }

        private string _Name;
        public virtual string Name
        {
            get
            {
                return _Name;
            }
            set
            {
                if (value != _Name)
                {
                    _Name = value;
                    PropChanged();
                }
            }
        }

        public virtual event PropertyChangedEventHandler
PropertyChanged;
        protected void PropChanged()
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                _isChanged = true;
                string name = new
StackTrace().GetFrame(1).GetMethod().Name.Substring(4);
                handler(this, new PropertyChangedEventArgs(name));
            }
        }
    }

The mapping of Level as follows:

    <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                       namespace="Domain"
                       assembly="libdomain">
      <class name="Domain.Region" table="tb_Region">
        <id name="ID" type="Int32">
          <generator class="native"/>
        </id>
        <property name="NO" type="String" length="16"/>
        <property name="Name" type="String" length="64" not-
null="true"/>
        <property name="Description" type="String" length="256"/>
        <property name="En" type ="Boolean" not-null="true"/>
      </class>
    </hibernate-mapping>


And i Get a collection of Region as follows:

                ISession session =
SessionFactory.Instance.GetSession(ConnString);
                IList<Region> rt =
session.CreateCriteria(typeof(Region)).List<Region>();

But some instance's type in collection is like
"RegionProxyfbd6621e466a4c7f8e9623ee071237b4", some instance's type in
collection is "Domain.Region"

why some instance's type is't "Domain.Region"?

Regards,
litgle

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to