Читати англійською Редагувати

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


DatabaseAttribute.Name Property

Definition

Gets or sets the name of the database.

C#
public string Name { get; set; }

Property Value

The name.

Examples

C#
[Database(Name="Database#5")]  
public class Database5 : DataContext  
{  
    …  
}  

Remarks

This property is required if you use the DatabaseAttribute attribute.

The information is used only if the connection itself does not specify the database name.

Applies to

Продукт Версії
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1