I am new to IoC and am using Autofac in my current project.
I have the following 2 classes:
public class UserService : IUserService
{
private rea
If a UserService needs an IMailService and a MailService needs an IUserService you have a dependency loop. I see a couple of options:
Does your UserService need an IMailService right away? Could you pass one in when it needs to send a message?
Can either query the resolver on-demand - that is, don't pass IUserService to MailService in the constructor but rather code MailService to resolve IUserService when it needs it?