Skip to main content
.NET 8.0+

InMemoryDataStore.GetConnectionString(String, Boolean) Method

Returns a connection string that can be used to create an InMemoryDataStore instance.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Xpo.v24.2.dll

Declaration

public static string GetConnectionString(
    string path,
    bool readOnly
)

Parameters

Name Type Description
path String

A string value that specifies the name (including the path) of the XML document that includes both schema and data.

readOnly Boolean

true if the XML document isn’t allowed to be changed; otherwise, false.

Returns

Type Description
String

A string containing the connection string to an InMemoryDataStore instance.

Remarks

The value returned by this method can be used to initialize a Session’s connection string (for instance, via the Session.ConnectionString or XpoDefault.ConnectionString property).

If you pass a null reference via the path parameter, the GetConnectionString method will return a connection string to create an InMemoryDataStore instance that is not bound to an XML file.

See Also