Back to Devexpress

StartupExtensions.MapXafDashboards(IEndpointRouteBuilder, String, String) Method

expressappframework-devexpress-dot-expressapp-dot-dashboards-dot-blazor-dot-startupextensions-dot-mapxafdashboards-x28-microsoft-dot-aspnetcore-dot-routing-dot-iendpointroutebuilder-system-dot-string-system-dot-string-x29.md

latest3.1 KB
Original Source

StartupExtensions.MapXafDashboards(IEndpointRouteBuilder, String, String) Method

Registers the required Dashboards Module routes in the application’s IEndpointRouteBuilder.

Namespace : DevExpress.ExpressApp.Dashboards.Blazor

Assembly : DevExpress.ExpressApp.Dashboards.Blazor.v25.2.dll

NuGet Package : DevExpress.ExpressApp.Dashboards.Blazor

Declaration

csharp
public static void MapXafDashboards(
    this IEndpointRouteBuilder endpoints,
    string dashboardEndpoint = "api/dashboard",
    string dashboardControllerName = "XafBlazorDashboard"
)
vb
<ExtensionAttribute>
Public Shared Sub MapXafDashboards(
    endpoints As IEndpointRouteBuilder,
    dashboardEndpoint As String = "api/dashboard",
    dashboardControllerName As String = "XafBlazorDashboard"
)

Parameters

NameTypeDescription
endpointsIEndpointRouteBuilder

The application’s route builder.

|

Optional Parameters

NameTypeDefaultDescription
dashboardEndpointString"api/dashboard"

The endpoint URL prefix used to send data requests to a server.

| | dashboardControllerName | String | "XafBlazorDashboard" |

The Controller name without the Controller suffix.

|

Remarks

Call this method in the Startup.Configure method when you add the Dashboards Module to your ASP.NET Core Blazor application:

File : MySolution.Blazor.Server\Startup.cs.

csharp
using DevExpress.ExpressApp.Dashboards.Blazor;
// ...
public class Startup {
    // ...
    public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
        // ...
        app.UseEndpoints(endpoints => {
            endpoints.MapXafDashboards();
            // ...
        }
    }
    // ...
}

See Also

StartupExtensions Class

StartupExtensions Members

DevExpress.ExpressApp.Dashboards.Blazor Namespace