foreach in list razor code example Example: cshtml foreach @foreach (var item in Model.Foos) { <div>@item.Bar</div> }