Sdílet prostřednictvím


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

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 vztah mezi webovou aplikací a instancí SQL Serveru, což umožňuje detekci změn v datech na serveru. Zajišťuje SqlDependency , že se výstupní stránky uložené v mezipaměti odeberou při každé změně tabulky SQL, na které závisí.

Poznámka:

SqlCacheDependency Třída monitoruje tabulku tak, aby při změně tabulky byla položka automaticky odebrána z mezipaměti. Tuto třídu nelze zdědit.

Platí pro

Viz také