Circular Dependency
I encounter a error message. Does it try to create IproductRepository interface before Helmetservice ? I dont know.
Here is the full error message;


5 Replies
this is the full error message
show the constructor for
HelmetService
public HelmetService(IProductRepository productRepository)
{
this.productRepository = productRepository;
}
yeah so
uh
You are registering
HelmetService
to be resolved as your IProductRepository
you then also try to inject an IProductRepository
into HelmetService
. This is a circular reference.
ie, helmetservice is requesting itselfoh