Ok, I feel like a total idiot. I have read the docs and still cant get this working with Ninject.
public class ContextAdapter:IDbSetProvider
{
private readonly IContextFactory _contextFactory;
#region Implementation of IDbSetProvider
public ContextAdapter(IContextFactory contextFactory)
{
this._contextFactory = contextFactory;
}
public IDbSet<TEntity> CreateDBSet<TEntity>() where TEntity : class
{
var context = _contextFactory.Create();
return context.Set<TEntity>();
}
#endregion
}
As you can see I am need to inject the contructor for the class above. Well, it is not going so well. Help!! before I go back to writing perl code. Kidding!! LOl
Thoughts folks?