All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

MSSql2005SqlDependencyCacheRoot.CreateSqlDependencyCacheRoot(IDbConnection, IDataStore, String, ISqlGeneratorFormatter, out IDisposable[]) Method

Creates an MSSql2005SqlDependencyCacheRoot instance associated with a specified MS SQL Server provider, which is used to access a database to be cached, based on specified settings.

Namespace: DevExpress.Xpo.DB.Helpers

Assembly: DevExpress.Xpo.v20.1.dll

Declaration

public static ICacheToCacheCommunicationCore CreateSqlDependencyCacheRoot(
    IDbConnection connection,
    IDataStore nonCachedProvider,
    string originalConnectionString,
    ISqlGeneratorFormatter formatter,
    out IDisposable[] objectsToDisposeOnDisconnect
)
Public Shared Function CreateSqlDependencyCacheRoot(
    connection As IDbConnection,
    nonCachedProvider As IDataStore,
    originalConnectionString As String,
    formatter As ISqlGeneratorFormatter,
    ByRef objectsToDisposeOnDisconnect As IDisposable()
) As ICacheToCacheCommunicationCore

Parameters

Name Type Description
connection IDbConnection

An IDbConnection object providing access to a database to be cached.

nonCachedProvider IDataStore

An MS SQL Server provider (an object implementing the IDataStore). Normally, you can pass a MSSqlConnectionProvider object or its descendant as the parameter.

originalConnectionString String

A connection string for an MS SQL Server database that supports Query Notifications.

formatter DevExpress.Xpo.DB.Helpers.ISqlGeneratorFormatter

A SQL query formatter (an object implementing the ISqlGeneratorFormatter). Normally, you can pass a MSSqlConnectionProvider object or its descendant as the parameter.

objectsToDisposeOnDisconnect IDisposable[]

An array of IDisposable objects that must be disposed on disconnect from the database.

Returns

Type Description
ICacheToCacheCommunicationCore

An MSSql2005SqlDependencyCacheRoot instance (an ICacheToCacheCommunicationCore implementation) ready to be used as the Root element in a cached hierarchy.

See Also