System.Reflection.TargetInvocationException

Apr 20, 2008 at 8:18 AM
Edited Apr 20, 2008 at 8:21 AM
Hi,

I have generated Business entity classes and repository classes using Repository Factory.
When I call create method on RepositoryFactory class as shown below, I get an error System.Reflection.TargetInvocationException.

ICountryRepository repository = RepositoryFactory.Create<ICountryRepository>();

repositoryFactory section in the config file is:

<repositoryFactory>
<repositories>
<add interfaceType="DataAccess.ICountryRepository, DataAccess" repositoryType="DataAccess.BusinessEntities.CountryRepositoryArtifacts.CountryRepository, DataAccess" />
</repositories>
</repositoryFactory>

Any help would be appreciated.

cheers
SS