tags:

views:

232

answers:

0

I have following configuration:

        ObjectFactory.Configure(x=>
            x.ForRequestedType<IAppDataService>()
            .TheDefaultIsConcreteType<TestAppDataService>()
            .AsSingletons());

        ObjectFactory.Configure(x=>
            x.ForRequestedType<IUserDataService>()
            .CacheBy(InstanceScope.Hybrid)
            .TheDefaultIsConcreteType<TestUserDataService>());

        ObjectFactory.Configure(x =>
            x.ForRequestedType<DaoFactory>()
            .CacheBy(InstanceScope.Hybrid));

Constructor of DaoFactory : DaoFactory(IAppDataService,IUserDataService) In most cases, when I call GetInstance I want to get the same instance within the same context, but sometimes I want a new instance with an additional constructor argument... DaoFactory(IDbConnection, IAppDataService, IUserDataService) how can I do that ?