Skip to main content
A newer version of this page is available. .
All docs
V20.2
.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.v20.2.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