Skip to main content
All docs
V25.1
  • .NET Framework 4.6.2+

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

    Creates an MSSql2005SqlDependencyCacheRoot instance associated with a specified Microsoft 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.v25.1.dll

    NuGet Package: DevExpress.Xpo

    Declaration

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

    Parameters

    Name Type Description
    connection IDbConnection

    An IDbConnection object providing access to a database to be cached

    nonCachedProvider IDataStore

    An Microsoft SQL Server provider (an object implementing the IDataStore). Normally, you can pass an MSSqlConnectionProvider object as the parameter.

    formatter DevExpress.Xpo.DB.Helpers.ISqlGeneratorFormatter

    A SQL query formatter (an object implementing the ISqlGeneratorFormatter). Normally, you can pass an 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

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

    See Also