I have an entity with a child. How can I display a count of the children for each object in my view?
I've tried:
<% foreach (var item in Model) { %>
<%: item.JobTitle %>
<%: item.EmploymentApps.Count %> Applications
<% } %>
but I'm getting a runtime error:
Compiler Error Message: CS0012: The type 'System.Data.Linq.EntitySet`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.