예제 #1
0
    /// <summary>
    /// 静态初始化
    /// </summary>
    static Program()
    {
        //获取连接字符串
        string connectionString = "Data Source=39.106.212.169;User Id=root;Password=123456;Initial Catalog=cheij_management;";

        //初始化数据容器
        DbContainer.Init <MySqlInitializer>(connectionString);
        //获取数据容器
        _container = DbContainer.Get(connectionString);
    }