Question

ASP.NET Core introduces View Components and Tag Helpers, both of which are great additions.

What I like about Tag Helpers is that their syntax is so much easier on the eyes compared to the traditional Html Helpers.

However, the new View Components are not so 'eye-friendly'.

My question is this: would it be possible to write a custom Tag Helper that makes both Partial Views and View Components more HTML like?

So instead of

@Html.PartialView("_MyPartial", @Model)
@Component.Invoke("_MyViewComponent")

Have something like this:

<partial asp-view="_MyPartial" asp-model="@Model"><partial>
<component asp-view="_MyViewComponent"><component>

This seems a little cleaner to me.