Creates a new DataConnection instance inheriting the PublicationScope
and locale set on the call stack. When outside an existing scope this default to PublicationScope,Published and the
default language on the website. You should use this constructure unless you need to force data to come from an alternative
scope. DataConnection can be used to access the Orckestra CMS storage.
Namespace: Composite.DataAssembly: Composite (in Composite.dll) Version: 5.3.6135.33083
Syntax
C# |
---|
public DataConnection() |
Visual Basic |
---|
Public Sub New |
Visual C++ |
---|
public: DataConnection() |
Examples
Here is an example of how to use it
CopyC#
using (DataConnection connection = new DataConnection()) { var q = from d in connection.Get<IMyDataType>() where d.Name == "Foo" select d; }