Reputation: 71
I'm trying to display a single property from a list of objects in the front end like so. DocumentRepoVaccineTypes is the list of objects in the View model. The information that is displayed in the front end is this in the column "System.Collections.Generic.HashSet`1[EHS.Entities.DocumentRepositoryVaccineTypes]"
public virtual ICollection<DocumentRepositoryVaccineTypes> DocumentRepoVaccineTypes { get; set; }
<td>
@document.DocumentRepoVaccineTypes
</td>
Upvotes: 1
Views: 170
Reputation: 6832
@String.Join(", ", document.DocumentRepoVaccineTypes.Select(type => type.SomeProperty))
Upvotes: 2