I created a custom membership provider

```
public class MyMembership : MembershipProvider
{
    private IRepository<User> Repo;
}

```

I figured out how to inject MyMembership using autofac:

```
builder.Register(c => Membership.Provider);

```

However, this doesn't work if I have a constructor that takes an IRepository (it only calls the parameterless constructor.) I tried doing changing from a private field to a public property and calling:

```
builder.Register(c => Membership.Provider).AutoWireProperties();

```

The problem is, MembershipProvider doesn't have a Repo property, it's only my class.

For the time being, I've not injected anything, and just created an empty constructor where I simply create a new instance of my Repo. But it makes it harder for testing.

So, is there any way that I can use AutoFac to inject my MyMembership, and have it use the injected Repo?