Skip to content

Instantly share code, notes, and snippets.

Created January 13, 2021 15:27
What would you like to do?
public class ChildrenBlock : ViewComponent
private readonly IViewModelBinder _viewModelBinder;
public ChildrenBlock(IViewModelBinder viewModelBinder)
_viewModelBinder = viewModelBinder;
public async Task<IViewComponentResult> InvokeAsync()
return View(
await _viewModelBinder.Bind<ChildrenBlockModel>(this.ViewContext));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment