I'm new to Ninject and I'm having problems using it with a custom membership provider.
My membership provider has a repository interface passed in. It looks like:
public class CustomMembershipProvider : MembershipProvider
{
public CustomMembershipProvider( IRepository repository )
{
}
}
I'm using the code thats part of the Account Model in the MVC app as a starting point.
However when it calls Membership.Provider
I get an error saying No parameterless constructor defined for this object
.
I've setup the bindings in ninject to bind a IRepository
to a Repository
class which work as I've testing this in a controller.
What are the correct bindings in Ninject to use for Membership.Provider
?