netTiers 数据库读写分离
底层生成不变,关键在调用的时候。比如读的连接串为:readcon;写的连接串为:;
在写bll层时注意,一般默认的调用是
DataRepository.Provider.QuestionProvider.Update(Question model);
//改为读写分离的写连接串
DataRepository.Providers["writecon"].QuestionProvider.Update(Question model);
//改为读写分离的写连接串
DataRepository.Providers["writecon"].QuestionProvider.Update(Question model);
宁可去碰壁,也不在家面壁;缘于自然,顺其自然。

浙公网安备 33010602011771号