Skip to main content
A newer version of this page is available. .

MSSql2005SqlDependencyCacheRoot.CreateSqlDependencyCacheRoot(IDataStore, SqlConnection, ISqlGeneratorFormatter, DataCacheConfiguration, out IDisposable[]) Method

Creates a 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.v18.2.dll

Declaration

public static ICacheToCacheCommunicationCore CreateSqlDependencyCacheRoot(
    IDataStore nonCachedProvider,
    SqlConnection connection,
    ISqlGeneratorFormatter formatter,
    DataCacheConfiguration cacheConfiguration,
    out IDisposable[] objectsToDisposeOnDisconnect
)

Parameters

Name Type Description
nonCachedProvider IDataStore

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

connection SqlConnection

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

formatter DevExpress.Xpo.DB.Helpers.ISqlGeneratorFormatter

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

cacheConfiguration DataCacheConfiguration

A DataCacheConfiguration object providing cache configuration settings.

objectsToDisposeOnDisconnect IDisposable[]

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

Returns

Type Description
ICacheToCacheCommunicationCore

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

See Also