/// <summary> /// 在枚举构架元素之前进行一些初始化的操作。 /// </summary> /// <typeparam name="T">架构的类型。</typeparam> /// <param name="connection">数据库链接对象。</param> /// <param name="restrictionValues">限制数组。</param> protected override void BeforeReturnSchemaElements <T>(DbConnection connection, string[] restrictionValues) { if (typeof(T) == typeof(Column)) { var res = GetTableRestrictions(restrictionValues); connection.As <OleDbConnection>(conn => { tbPrimary = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Primary_Keys, res); }); } base.BeforeReturnSchemaElements <T>(connection, restrictionValues); }
public static INorm AsText(this DbConnection connection) => connection.As(CommandType.Text);
public static INorm AsProcedure(this DbConnection connection) => connection.As(CommandType.StoredProcedure);