OutputCacheProfile.SqlDependency Vlastnost

Definice

Získá nebo nastaví SqlDependency vlastnost.

public:
 property System::String ^ SqlDependency { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("sqlDependency")]
public string SqlDependency { get; set; }
[<System.Configuration.ConfigurationProperty("sqlDependency")>]
member this.SqlDependency : string with get, set
Public Property SqlDependency As String

Hodnota vlastnosti

String

Hodnota SqlDependency.

Atributy

Příklady

Následující příklad kódu ukazuje, jak použít SqlDependency vlastnost.


// Get the current SqlDependency.
String sqlDependencyValue = 
    outputCacheProfile.SqlDependency;

// Set the SqlDependency.
outputCacheProfile.SqlDependency = 
    string.Empty;
  ' Get the current SqlDependency.
  Dim sqlDependencyValue As String = _
  outputCacheProfile.SqlDependency

  ' Set the SqlDependency.
  outputCacheProfile.SqlDependency = _
  String.Empty

Poznámky

Definuje SqlDependency relaci mezi webovou aplikací a instancí SQL Server, což umožňuje detekci změn v datech na serveru. ZajišťujeSqlDependency, aby se výstupní stránky uložené v mezipaměti odebraly vždy, když SQL tabulka, na které závisí, se změní.

Poznámka

Třída SqlCacheDependency monitoruje tabulku tak, aby se po změně tabulky automaticky odebrala z mezipaměti. Tuto třídu nelze zdědit.

Platí pro

Viz také