#
dagda1
Hi all,
I am developing a custom module and I am trying to utilise the generic methods in CommonDao. One thing that I don't seem to be able to get my head round is that when I call the GetObjectByIdmethod like this:
public Asset Load(int id)
{
return (Asset)_commonDao.GetObjectById(typeof(Asset), id);
}
The type returned is not of type Asset as i would expect but of the rather cryptically named NHibernate type:
CProxyTypeAssetdomain_INHibernateProxy_ISerializable2
I have tried casting it and I cannot use the is operator to determine it's type.
Can anyone tell me what is going on behind the scenes??
Thanks
Paul
I am developing a custom module and I am trying to utilise the generic methods in CommonDao. One thing that I don't seem to be able to get my head round is that when I call the GetObjectByIdmethod like this:
public Asset Load(int id)
{
return (Asset)_commonDao.GetObjectById(typeof(Asset), id);
}
The type returned is not of type Asset as i would expect but of the rather cryptically named NHibernate type:
CProxyTypeAssetdomain_INHibernateProxy_ISerializable2
I have tried casting it and I cannot use the is operator to determine it's type.
Can anyone tell me what is going on behind the scenes??
Thanks
Paul