The DataConnection type exposes the following members.

Constructors

  NameDescription
Public methodDataConnection()()()()
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 C1 CMS storage.
Public methodDataConnection(CultureInfo)
Creates a new DataConnection instance with current or default PublicationScope and the given locale. DataConnection can be used to access the C1 CMS storage.
Public methodDataConnection(PublicationScope)
Creates a new DataConnection instance with the given scope and current (or default) locale. DataConnection can be used to access the C1 CMS storage.
Public methodDataConnection(PublicationScope, CultureInfo)
Creates a new DataConnection instance with the given scope and the given locale. DataConnection can be used to access the C1 CMS storage.

Methods

  NameDescription
Public methodAdd<(Of <<'(TData>)>>)(IEnumerable<(Of <<'(TData>)>>))
Adds the TData instances to the default C1 storage. If the storage does not exist, then one is created. This method triggers the events OnBeforeAdd and OnAfterAdd for each item in items
Public methodAdd<(Of <<'(TData>)>>)(TData)
Adds the TData instance to the default C1 storage. If the storage does not exist, then one is created. This method triggers the events OnBeforeAdd and OnAfterAdd for the item item.
Public methodAddService
attach service to data connection
Public methodCreateNew<(Of <<'(TData>)>>)
Create a new TData that can be added using Add<(Of <<'(TData>)>>)(TData). This method triggers the event OnNew for the return value of the method.
Public methodDelete<(Of <<'(TData>)>>)(IEnumerable<(Of <<'(TData>)>>))
Deletes the given TData instances permently from the C1 storage. This method triggers the event OnDeleted for each item in items
Public methodDelete<(Of <<'(TData>)>>)(TData)
Deletes the given TData instance permently from the C1 storage. This method triggers the event OnDeleted for the item item
Public methodDisableServices
disable all services in the data connection
Public methodGet<(Of <<'(TData>)>>)
Returns an IQueryable of the given IData interface. If no storage supports the given IData interface, an exception is thrown.
Public methodGetService
Resolve service of a specific type that is attached to connection's data scope
Public methodStatic memberNew<(Of <<'(TData>)>>)
Create a new TData that can be added using Add<(Of <<'(TData>)>>)(TData). This method triggers the event OnNew for the return value of the method.
Public methodUpdate<(Of <<'(TData>)>>)(IEnumerable<(Of <<'(TData>)>>))
Updates the geven TData instances in the C1 storage. If any property values in any of the TData instances, these would be saved into the storage. This method triggers the events OnBeforeUpdate and OnAfterUpdate for each item in items
Public methodUpdate<(Of <<'(TData>)>>)(TData)
Updates the given TData instance in the C1 storage. If any property values has been changed, these would be saved into the storage. This method triggers the events OnBeforeUpdate and OnAfterUpdate for the item item

Properties

  NameDescription
Public propertyStatic memberAllLocales
All locales added to C1.
Public propertyCurrentLocale
The current locale.
Public propertyCurrentPublicationScope
The current publication scope.
Public propertySitemapNavigator
A SitemapNavigator instance. See SitemapNavigator

See Also