Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Core MVC View Components

In ASP.NET Core MVC (formerly MVC 6) there is a new area of functionality called View Components which appear to be a better alternative to Partial Views. I've seen the following View Component Example. But there doesn't seem much more information currently as to their usage.

I'm trying to evaluate if its worth using this pattern and if this can/(or is intended) to be used as a more baked in method to help with donut caching.

like image 520
Tim Avatar asked Nov 18 '14 08:11

Tim


1 Answers

View components are definitively great and it's certainly an improvement. The one big improvement is that you can run asynchronous operations on view components where it wasn't possible with child actions.

More information available here:

  • Exciting Things About ASP.NET vNext Series: MVC View Components

For donut caching, there are two separate issues filed that you can comment/track: #1232 and #536

like image 115
tugberk Avatar answered Nov 27 '22 06:11

tugberk