SqlCacheDependencyDatabase.Name Propriedade

Definição

Obtém ou define o nome da base de dados.

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Name { get; set; }
[<System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Name : string with get, set
Public Property Name As String

Valor de Propriedade

Uma cadeia que especifica o nome usado por SqlCacheDependencyDatabase para identificar a base de dados.

Atributos

Exemplos

O seguinte exemplo de código mostra como usar a Name propriedade.


// Get the current Name property value.
string nameValue = sqlCdd.Name;

// Set the Name for this configuration element.
sqlCdd.Name = "ConfigElementName";
' Get the current Name property value.
Dim nameValue As String = sqlCdd.Name

' Set the Name for this configuration element.
sqlCdd.Name = "ConfigElementName"

Observações

A Name propriedade permite-lhe aceder e modificar programaticamente o name atributo de um add elemento do databases nó num ficheiro de configuração.

O name atributo identifica a base de dados cuja tabela é usada para o SqlCacheDependency.

Aplica-se a

Ver também