asp.net mvc - Is there a performance sacrifice when calling a C# helper from razor? -


if (from razor view), call c# helper (i.e compiled dll). there performance loss here?

e.g

i use @model.user.getfriendlyname(); (calls method in model inside dll).

or pass friendlyname razor view, (storing in viewmodel initially).

is there speed difference between these 2 methodologies?

calling user.getfriendlyname() isn't slower in view anywhere else. razor views compiled classes behind scenes.

one thing keep in mind if method gets database cause queries , if using orm lazy loading context/session lost then.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -