Creates a new DataConnection instance with the given scope and current (or default) 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
)
Visual Basic
Public Sub New ( _
	scope As PublicationScope _
)
Visual C++
public:
DataConnection(
	PublicationScope scope
)

Parameters

scope
Type: Composite.Data..::..PublicationScope
The PublicationScope data should be read from.

Examples

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

See Also