DbCommon/DataBaseProvider.cs

(完整代码) 852B

using System;
using System.Collections.Generic;
using System.Text;

namespace NLKIRADBCommon
{
    public class DataBaseProvider
    {
        public static DataBase CreateDataBase(dbName dbName)
        {
            string dbKey = dbName.ToString().ToLower();

            if(dbName.AUTO == dbName)
                dbKey = ConfigurationDataBaseInfo.GetFirstKey();


            switch (dbKey.ToLower())
            {
                case "sqlserver2000":
                    return new SQL2000DataBase(ConfigurationDataBaseInfo.GetConnectionString(dbKey));
                case "access":
                    return new AccessDataBase(ConfigurationDataBaseInfo.GetConnectionString(dbKey));
                default:
                    throw new Exception("请先配置连接字符串!");
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。