I have the following class:
public class DatabaseFactory : Disposable, IDatabaseFactory where C : DbContext, BaseContext, new()
{
priva
You need to register the constructor parameter:
container.Register(
Component.For<IDatabaseFactory>().ImplementedBy<DatabaseFactory>()
.DependsOn(Dependency.OnValue("connectionString", connectionString))
);
You can set dependencies on Resolve() method by adding an anonymous type with constructor parameter's name
Example:
IDatabaseFactory factory = container.Resolve<IDatabaseFactory>
(new { connectionString = connectionString });