@model RelationshipMapViewModel
@foreach (var side in new[] { "top", "left", "right", "bottom" }) { var supporting = Model.Cast.Where(x => x.CharacterImportance >= 4 && x.CharacterImportance < 8).ToList(); var cast = side == "top" ? Model.Cast.Where(x => x.CharacterImportance >= 8) : side == "bottom" ? Model.Cast.Where(x => (x.CharacterImportance ?? 0) < 4) : supporting.Where((x, i) => i % 2 == (side == "left" ? 0 : 1)); @if (side == "left") { @:

Create / change relationship

Change characters