Hi,goofsr
I added "Page_init()" in the code just like this:
protected void Page_Init(object sender, EventArgs e)
{
DataRepository.AddConnection("test", "Data Source=(local)\normal;Initial Catalog=zs;User ID=sa;Password=sa");
BasZoneDataSource.Provider = DataRepository.Connections["test"].Provider.BasZoneProvider;
}
"BasZoneDataSource" is a datasourcecontrol and it's the datasource of one gridview.
But this can't work, BasZoneDataSource's GetAll() or GetPaged() needs TransactionManager.
TransactionManager created by "mgr = DataRepository.Provider.CreateTransaction();" in the EntityTransactionModule.cs.
So TrasactionManager still use default Provider, default ConnectionsString.
How can i change the TransactionManager's ConnectionString too?