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

    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.v25.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