Back to Devexpress

MSSql2005SqlDependencyCacheRoot.CreateProviderFromString_WithCache(String, AutoCreateOption, out IDisposable[]) Method

xpo-devexpress-dot-xpo-dot-db-dot-helpers-dot-mssql2005sqldependencycacheroot-dot-createproviderfromstring-underscore-withcache-x28-system-dot-string-devexpress-dot-xpo-dot-db-dot-autocreateoption-system-dot-idisposable-x29.md

latest3.3 KB
Original Source

MSSql2005SqlDependencyCacheRoot.CreateProviderFromString_WithCache(String, AutoCreateOption, out IDisposable[]) Method

Returns a cached data store provider, created based on specified settings.

Namespace : DevExpress.Xpo.DB.Helpers

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public static IDataStore CreateProviderFromString_WithCache(
    string connectionString,
    AutoCreateOption autoCreateOption,
    out IDisposable[] objectsToDisposeOnDisconnect
)
vb
Public Shared Function CreateProviderFromString_WithCache(
    connectionString As String,
    autoCreateOption As AutoCreateOption,
    ByRef objectsToDisposeOnDisconnect As IDisposable()
) As IDataStore

Parameters

NameTypeDescription
connectionStringString

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

| | autoCreateOption | AutoCreateOption |

An AutoCreateOption value that specifies which operations should be performed when a data store is accessed for the first time.

| | objectsToDisposeOnDisconnect | IDisposable[] |

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

|

Returns

TypeDescription
IDataStore

A DataCacheNode instance (an IDataStore implementation) which is connected to a MSSql2005SqlDependencyCacheRoot associated with a MSSqlConnectionProvider, that is created based on specified settings.

|

Remarks

Do not pass the connection string created via the MSSqlConnectionProvider.GetConnectionString method. The CreateProviderFromString_WithCache method accepts generic connection strings only, without the XPO-specific “XpoProvider=XXX“ part.

See Also

MSSql2005SqlDependencyCacheRoot Class

MSSql2005SqlDependencyCacheRoot Members

DevExpress.Xpo.DB.Helpers Namespace