コード例 #1
0
ファイル: SPAccess.cs プロジェクト: DK189/SPAccess
        /// <summary>
        ///
        /// </summary>
        /// <param name="ConnectionString">Chuỗi kết nối ở dạng SQLConnectionString hoặc EntityConnectionString</param>
        /// <param name="IsEntityConnectionString">Cho hệ thống biết chuỗi này là chuỗi kết nối cho SQL hay Entity (Default: true)</param>
        public SPAccess(string ConnectionString, bool IsEntityConnectionString = true)
        {
            string RealConnectionString = string.Empty;

            if (IsEntityConnectionString)
            {
                RealConnectionString = ConnectionString;
            }
            else
            {
                RealConnectionString = new EntityConnectionStringBuilder()
                {
                    Name     = "SPAccessDB",
                    Provider = "System.Data.SqlClient",
                    ProviderConnectionString = ConnectionString,
                }.ConnectionString;
            }
            this.DB = new SPAccessDB(RealConnectionString);
            Constructor();
        }
コード例 #2
0
ファイル: SPAccess.cs プロジェクト: DK189/SPAccess
 internal SPAccess(SPAccessDB DB)
 {
     this.DB = DB;
     Constructor();
 }
コード例 #3
0
ファイル: SPAccess.cs プロジェクト: DK189/SPAccess
 /// <summary>
 /// Khởi tạo SPAccess với chuỗi kết nối trong tệp .config
 /// </summary>
 public SPAccess()
 {
     this.DB = new SPAccessDB();
     Constructor();
 }