예제 #1
0
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="listConnSettings">
        /// 连接字符串配置Key集合,配置多个连接则是读写分离
        /// </param>
        /// <returns></returns>
        public static ISugerHandler Instance(List <string> listConnSettings)
        {
            var db = new SugerHandler();

            db.Init(listConnSettings);
            return(db);
        }
예제 #2
0
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="serverIp">服务器IP</param>
        /// <param name="user">用户名</param>
        /// <param name="pass">密码</param>
        /// <param name="dataBase">数据库</param>
        /// <returns></returns>
        public static ISugerHandler Instance(string serverIp, string user, string pass, string dataBase)
        {
            var db = new SugerHandler();

            db.Init(serverIp, user, pass, dataBase);
            return(db);
        }
예제 #3
0
        /// <summary>
        /// 初始化
        /// </summary>
        /// <returns></returns>
        public static ISugerHandler Instance()
        {
            var db = new SugerHandler();

            db.Init();
            return(db);
        }