I want to calculate the age in view class without changing the model class .
I already calculate the age .But it doesn’t show in the web grid
So problem is how to display the variable in grid
<% var age=(DateTime.Today.Year - item.BirthDay.Value.Year);
@Html.DisplayTextFor(model => age);
%>
i didn’t find correct answer .finally came up with solution