Creates a new DataConnection instance with the given scope and the given locale. DataConnection can be used to access the C1 CMS storage.

Namespace: Composite.Data
Assembly: Composite (in Composite.dll) Version: 6.1.6325.31818

Syntax

C#
public DataConnection(
	PublicationScope scope,
	CultureInfo locale
)
Visual Basic
Public Sub New ( _
	scope As PublicationScope, _
	locale As CultureInfo _
)
Visual C++
public:
DataConnection(
	PublicationScope scope, 
	CultureInfo^ locale
)

Parameters

scope
Type: Composite.Data..::..PublicationScope
The PublicationScope data should be read from.
locale
Type: System.Globalization..::..CultureInfo
The desired locale. This should be one of the locale found in AllLocales

Examples

Here is an example of how to use it
CopyC#
using (DataConnection connection = new DataConnection(PublicationScope.Published, new CultureInfo("da-DK")))
{
   var q = 
      from d in connection.Get<IMyDataType>()
      where d.Name == "Foo"
      select d;
}

See Also