Reputation: 22652
Well, the word “Control” is a misnomer here. What I mean is RAZOR counterparts for databound controls like GridView.
Since there is no viewstate in MVC, we need to set data each time in tables. What are the standard workarounds for avoiding this performance hit? I need to create a sample application with this.
Note: This is definitely a programming question - Programming for the above mentioned requirement.
Upvotes: 0
Views: 360
Reputation: 1038850
What are the standard workarounds for avoiding this performance hit?
It will depend on the situation. Caching the results of commonly used and expensive database queries is a commonly used approach to avoid hitting the database every time you need to load some data.
This being said, you should have experimentally proven that querying the database is actually the bottleneck for your application before doing any premature optimizations. Because do you know what is very often the result of premature optimizations: it is worse than before we started the optimization. So do it only after you have exact numbers that you have a bottleneck related to querying the database.
Upvotes: 1