Home » Community » View question
Question
Cycle detected in configuration??
I've tried to extend the productdatamapper as we did in the training but I get a IoC error that I can't figure out.
Cycle detected in configuration.
Component ProductDataMapper has a dependency on System.Data.IDataReader, but it doesn't provide an override.
You must provide an override if a component has a dependency on a service that it - itself - provides
Exception Details: Castle.MicroKernel.Resolvers.DependencyResolverException: Cycle detected in configuration.
Component ProductDataMapper has a dependency on System.Data.IDataReader, but it doesn't provide an override.
You must provide an override if a component has a dependency on a service that it - itself - provides
Answers
This is because of the way Scensum is using IoC to resolve the DataMapperBase<T> implementation with the dataReader as parameter to the constructor.
The IDataReader parameter name must be "dataReader" (Note! Case sensitive) for the IoC to work.
You need to login to answer this question