Поделиться через


SqlCacheDependencyDatabase.Name Свойство

Определение

Возвращает или задает имя базы данных.

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

Значение свойства

Строка, указывающая имя, используемое SqlCacheDependencyDatabase для идентификации базы данных.

Атрибуты

Примеры

В следующем примере кода показано, как использовать Name свойство.


// 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"

Комментарии

Свойство Name позволяет программным способом обращаться к name атрибуту add элемента databases узла в файле конфигурации.

Атрибут name определяет базу данных, для которой используется SqlCacheDependencyтаблица.

Применяется к

См. также раздел