title: should use functions inside Razor view or not?
body: <p>My question is about working with MVC Razor view engine.</p>
  
  <p>To display data it is allowed to use some C# functions as inline functions e.g.</p>
  
  <pre><code>&lt;td&gt;@(Html.DisplayFor(m=&gt;row.CurrencyFrom).ToString().Substring(3,3))&lt;/td&gt;
  &lt;td&gt;@(Html.DisplayFor(m=&gt;row.rate).ToString("0.#####"))&lt;/td&gt;
  </code></pre>
  
  <p>Is it a good approach to use these sort of functions here. I am sorry I am new to MVC and Razor but it looks like it is against principal of separation. Please guide me what is correct way to do these sort of formatting and functionalists. Not sure is there a sort of best practice or guidline available on it ?</p>
  
  <p>Much thanks for your guidance.</p>