Connection string 连接字符串依赖性注入标识服务器v3

Connection string 连接字符串依赖性注入标识服务器v3,connection-string,autofac,thinktecture-ident-server,identityserver3,Connection String,Autofac,Thinktecture Ident Server,Identityserver3,我正在使用ThinktectureIdentityServerV3,在解决如何使依赖性注册对两个不同的存储库使用不同的连接字符串时遇到了问题。见下面的代码 options.Factory.Register(Registration.RegisterType<IRepository<ScopeWrapper>>(typeof(MongoRepository<ScopeWrapper>))); options.Factory.Register(Registrati

我正在使用ThinktectureIdentityServerV3,在解决如何使依赖性注册对两个不同的存储库使用不同的连接字符串时遇到了问题。见下面的代码

options.Factory.Register(Registration.RegisterType<IRepository<ScopeWrapper>>(typeof(MongoRepository<ScopeWrapper>)));
options.Factory.Register(Registration.RegisterType<IRepository<User>>(typeof(MongoRepository<User>)));
options.Factory.Register(Registration.RegisterType(typeof(MongoRepository));
options.Factory.Register(Registration.RegisterType(typeof(MongoRepository));
谢谢