Пример #1
0
        /// <summary>
        /// 创建数据库拼接连接字符串
        /// </summary>
        /// <param name="config">数据库配置</param>
        /// <param name="visitType">数据库访问类型</param>
        /// <returns>数据库连接字符串</returns>
        protected override string CreateDBSpliceConStr(DatabaseConfig config, DBVisitType visitType)
        {
            var scsb = new SQLiteConnectionStringBuilder();

            scsb.Pooling    = true;
            scsb.DataSource = DirectoryInfoEx.GetFullPath(config.DatabaseName);
            if (!string.IsNullOrEmpty(config.Password))
            {
                scsb.Password = config.Password;
            }

            return(this.CreateSQLiteDBConStr(scsb));
        }