IViewComponentResult Interface

Result type of a Microsoft.AspNetCore.Mvc.ViewComponent.

Namespace
Microsoft.AspNetCore.Mvc
Assemblies
  • Microsoft.AspNetCore.Mvc.ViewFeatures

Syntax

public interface IViewComponentResult
interface Microsoft.AspNetCore.Mvc.IViewComponentResult

Methods

Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext)

Executes the result of a Microsoft.AspNetCore.Mvc.ViewComponent using the specified <em>context</em>.

Arguments:context (Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext) – The Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext for the current component execution.
void Execute(ViewComponentContext context)
ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext)

Asynchronously executes the result of a Microsoft.AspNetCore.Mvc.ViewComponent using the specified <em>context</em>.

Arguments:context (Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext) – The Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext for the current component execution.
Return type:System.Threading.Tasks.Task
Returns:A System.Threading.Tasks.Task that represents the asynchronous execution.
Task ExecuteAsync(ViewComponentContext context)