My question is about working with MVC Razor view engine.
To display data it is allowed to use some C# functions as inline functions e.g.
<td>@(Html.DisplayFor(m=>row.CurrencyFrom).ToString().Substring(3,3))</td>
<td>@(Html.DisplayFor(m=>row.rate).ToString("0.#####"))</td>
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 ?
Much thanks for your guidance.