-
Use
MapShortCircuit
or.ShortCircuit()
to efficiently respond to a request without going through a middleware pipeline run. -
WebApplication.CreateSlimBuilder
createsWebApplicationBuilder
with minimal configuration defaults. -
WebApplication.CreateEmptyBuilder
createsWebApplicationBuilder
with no built-in behavior.
-
This sample demonstrates a simple usage of QuickGrid component displaying int, string, date, and boolean data types.
-
This sample demonstrates a simple usage of Razor Component component in SSR (Server Side Rendering).
-
This sample demonstrates rendering a Razor Component from Minimal API via
RazorComponentResult
and passing data via a dictionary. -
This sample demonstrates rendering a Razor Component from Minimal API via
RazorComponentResult
and passing data via anonymous object. -
This sample demonstrates rendering a Razor Component using
Html.RenderComponentAsync
and passing data via anonymous object. -
This sample demonstrates rendering a Razor Component from a MVC Controller via
RazorComponentResult
and passing data via a dictionary. -
This sample demonstrates the new section functionality using
SectionOutlet
to mark a section andSectionContent
to supply the content to a section. -
This sample demonstrates a Razor Component Page SSR (Server Side Render) hosting Razor Component with Blazor Server Side (interactive) and Blazor Streaming Rendering.
-
This sample demonstrates a Razor Component Page SSR (Server Side Render) hosting Razor Component with Blazor Web Assembly (interactive) and Blazor Streaming Rendering.
-
This sample demostrates the new attribute
[SupplyParameterFromQuery]
that allows Blazor component to get values directly from query string. -
This sample demonstrates a Razor Component Page SSR that handle a POST form, hosts "number" component with with Streaming rendering and hosts "interactive" components backed by Blazor Web Assembly and Blazor Server.
-
This sample shows how to update the UI multiple times using
StateHasChanged();
while in streaming rendering mode. -
This sample shows how to access
HttpContext
from a static Razor component. -
This sample shows how to use
.AddAdditionalAssemblies
to allow the a host project to discover Page components in a separate WASM project.
-
This example shows how to perform automatic data binding for a form
POST
request using[SupplyParameterFromForm]
. We will use normal<form>
tag in this case. -
This example shows how to perform automatic data binding for a form
POST
request using<EditForm/>
and[SupplyParameterFromForm]
. -
This example shows how to perform multiple automatic data binding for a form
POST
request using[SupplyParameterFromForm]
. We will use normal<form>
tag in this case. -
This example shows how to perform multiple automatic data binding for a form
POST
request using<EditForm/>
and[SupplyParameterFromForm]
. -
This example shows how to perform data validation using
DataAnnotationsValidator
andEditForm
.
-
This example shows how to use Blazor SSR with MVC in the same system.
-
This example shows how to use Blazor SSR with Razor Pages in the same system.
-
This example shows how to use Blazor SSR with Minimal API in the same system.
-
This example shows how to use Blazor SSR with MVC, Razor Pages and Minimal API in the same system.
-
This sample shows how to set root level cascading values without using
<CascadingValue/>
component. -
This sample shows how to set root level named cascading values without using
<CascadingValue/>
component. -
This sample shows how to set root level dynamic cascading values using
CascadingValueSource
. -
This sample shows how to set root level named dynamic cascading values using
CascadingValueSource
. -
This sample shows how to use
[Inject(Key)]
in consuming keyed services.
-
Minimal API Form Model Binding
This sample demonstrates the ability to use
[FromForm]
binding in Minimal API.
-
This sample demonstrates how to configure a request timeout in Minimal API.
-
Trigger exception on a timeout using
HttpContext.RequestAborted.ThrowIfCancellationRequested()
on a timeout that was specified using a named policy in Minimal API. -
Trigger exception on a timeout using
HttpContext.RequestAborted.ThrowIfCancellationRequested()
on a default timeout policy in Minimal API. -
Use
RequestTimeout
attribute in an MVC controller to specify when timeout is trigerred. -
Use
RequestTimeout
attribute in an MVC controller to use a named policy. -
Use default timeout policy in an MVC controller.
-
Implement
IExceptionHandler
to handle ASP.NET Core exceptions. -
Implement multiple
IExceptionHandler
to handle ASP.NET Core exceptions.
-
Use
IServiceProvider.GetRequiredKeyedService<T>(key)
to get different type of implementation instances based on string key in Minimal API -
Use
IServiceProvider.GetRequiredKeyedService<T>(key)
to get different type of implementation instances based on string key in MVC