次の方法で共有


DatabaseAttribute.Name Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the name of the database.

Namespace:  System.Data.Linq.Mapping
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

Syntax

'Declaration
Public Property Name As String
public string Name { get; set; }

Property Value

Type: System.String
The name.

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.

Examples

<Database(Name:="Database#5")> _
Public Class Database5
    Inherits DataContext
    ...
End Class
[Database(Name="Database#5")]
public class Database5 : DataContext
{
    ...
}

Version Information

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.