Friday, June 26, 2020

ASP.NET Core–Using Value Tuples in Razor

I was wondering if it was possible to use ValueTuples as your Razor model. This turned out to work perfectly!

Here is my ViewComponent method(notice that this also works in Razor pages and MVC controllers):

And here is my Razor view: