Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to: Specify Database Names (LINQ to SQL)

Use the Name property on a DatabaseAttribute attribute to specify the name of a database when a name is not supplied by the connection.

For code samples, see Name.

To specify the name of the database

  1. Add the DatabaseAttribute attribute to the class declaration for the database.

  2. Add the Name property to the DatabaseAttribute attribute.

  3. Set the Name property value to the name that you want to specify.

Show:
© 2017 Microsoft