This constructor works great
public BlankObjectContext(DbContextOptions<BlankObjectContext> options) : base(options)
{
}
This overloaded constructor
public OverloadObjectContext(DbContextOptions<OverloadObjectContext> options, IDbContext dbContext, INopFileProvider fileProvider) : base(options)
{
this._dbContext = dbContext;
this._fileProvider = fileProvider;
}
Gives me an error at
public static void RegisterPluginDataContext<TContext>(this ContainerBuilder builder, string contextName) where TContext : DbContext, IDbContext
{
//register named context
builder.Register(context => (IDbContext)Activator.CreateInstance(typeof(TContext), new[] { context.Resolve<DbContextOptions<TContext>>() }))
.Named<IDbContext>(contextName).InstancePerLifetimeScope();
}
System.MissingMethodException: 'Constructor on type 'Nop.Plugin.Fanolli.Journal.Data.OverloadObjectContext' not found.'
any idea why?