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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -