@using System.Net.Http.Headers @model Dictionary @{ // Group the samples into a single tab if they are the same. Dictionary samples = Model.GroupBy(pair => pair.Value).ToDictionary( pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()), pair => pair.Key); var mediaTypes = samples.Keys; }
@foreach (var mediaType in mediaTypes) {

@mediaType

Sample: @{ var sample = samples[mediaType]; if (sample == null) {

Sample not available.

} else { @Html.DisplayFor(s => sample); } }
}