This part of code is not working
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem=>item.Registrations.Count())
</td>
and throws an error
[InvalidOperationException: Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.]
But this part of code below is working as a charm.
@foreach (var item in Model) {
<tr>
<td>
@item.Registrations.Count()
</td>
Is there anybody who can explain why is so?