Skip to main content
All docs
V24.1
.NET Framework 4.5.2+

WebApiDataStoreClient.GetConnectionString(String) Method

Returns a connection string that can be passed to the XpoDefault.GetDataLayer and XpoDefault.GetConnectionProvider methods.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

public static string GetConnectionString(
    string url
)

Parameters

Name Type Description
url String

A web service address that includes the controller name.

Returns

Type Description
String

A string that contains the connection string for a WebApiDataStoreClient instance.

Remarks

WebApiDataStoreClient uses the System.Net.Http.HttpClient) component. To operate correctly, HttpClient.BaseAddress should point to a controller route.

HttpClient merges BaseAddress with a relative URI according to section 5.2.3. Merge Paths. This means that HttpClient excludes the last segment of the BaseAddress. To prevent this, add a slash (/) to the end of the BaseAddress.

See Also