Class UseParameterlessEndpoint<TResult>
An alternative to UseEndpoint<TArg, TResult> for endpoints that don't take any arguments. This fetches the query automatically, unless AutoFetch is set to false.
public sealed class UseParameterlessEndpoint<TResult> : UseEndpointBase<Unit, TResult>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Type Parameters
TResult
- Inheritance
-
UseEndpointBase<Unit, TResult>UseParameterlessEndpoint<TResult>
- Implements
- Inherited Members
Properties
AutoFetch
If set to true (the default), the query will be run automatically when the component is initialized.
[Parameter]
public bool AutoFetch { get; set; }
Property Value
ChildContent
[Parameter]
[EditorRequired]
public RenderFragment<Query<TResult>> ChildContent { get; set; }
Property Value
- RenderFragment<Query<TResult>>
Endpoint
The endpoint to use.
[Parameter]
[EditorRequired]
public ParameterlessEndpoint<TResult> Endpoint { get; set; }
Property Value
- ParameterlessEndpoint<TResult>
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
CreateQuery(Endpoint<Unit, TResult>)
protected override Query<Unit, TResult> CreateQuery(Endpoint<Unit, TResult> endpoint)