Sorry, my actual program code uses a cast too; the code in my first email incorrectly omitted the cast. However, I still get the error with or without the cast.
I got the impression from reading up on the Castle Project website that DynamicProxy doesn't support Generics. I think this is likely my problem because the error arrived about the same time I began using Generics extensively. If anyone has any info on the subject of succesfully designing IDaos, Daos, and their respective services using Generics I would love to hear from you. Thanks, J -----Original Message----- From: Ron Grabowski [mailto:[EMAIL PROTECTED] Sent: February 7, 2006 9:52 PM To: [email protected] Subject: Re: Getting wrong type back from DaoManager.GetType() I've always casted the result from GetDao(): _companyDao = (ICompanyDao)_daoManager.GetDao(typeof(ICompanyDao)); --- Jason Taylor <[EMAIL PROTECTED]> 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 > > >

