ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Getting wrong type back from DaoManager.GetType()
Date Wed, 08 Feb 2006 02:52:12 GMT
I've always casted the result from GetDao():

 _companyDao = (ICompanyDao)_daoManager.GetDao(typeof(ICompanyDao));

--- Jason Taylor <jtaylor@escoinst.com> wrote:

> Hello all,
> 
> The DaoFactory portion of my dao.config is configured thus:
> ...
> <daoFactory>
> 	<dao
> interface="Data.Persistence.Interface.Directory.Core.ICompanyDao,
> Data.Persistence" 
> 	
> implementation="Data.Persistence.SqlMapper.Directory.Core.CompanyDao,
> Data.Persistence" />
> </daoFactory>
> ...
> 
> 
> Within my CompanyService class, my call to:
> 	_companyDao = _daoManager.GetDao( typeof( ICompanyDao ) )	
> 
> sets _companyDao as the following type:
> 	{ProxyInterfaceCoreCompanyDao_ICompanyDao_IDao_ISerializable}
> 
> rather than the expected:
> 	{Data.Persistence.SqlMapper.Directory.Core.CompanyDao}
> 
> 
> I am using Generics here and there in the code; could that be the
> problem?
> If so, where should I NOT use Generics?
> 
> Thanks,
> 
> Jason
> 
> 
> 


Mime
View raw message