DataContext Constructor (String, MappingSource)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Initializes a new instance of the DataContext class by referencing a file source and a mapping source.
Namespace: System.Data.Linq
Assembly: System.Data.Linq (in System.Data.Linq.dll)
Syntax
'Declaration
Public Sub New ( _
fileOrConnection As String, _
mapping As MappingSource _
)
public DataContext(
string fileOrConnection,
MappingSource mapping
)
Parameters
- fileOrConnection
Type: System.String
This argument can be any one of the following:
Using the isostore:/ prefix, the name of the file where a local database resides in isolated storage.
A complete connection string.
- mapping
Type: System.Data.Linq.Mapping.MappingSource
The MappingSource.
Remarks
For information about supported connection strings and using a local database in your Windows Phone application, see Local Database Overview for Windows Phone.
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.