I am a bit lost when it comes to querying arrays within arrays. My model comprises of the following:
(Arrangements) > (InterestedPlayers, JustPlayId) > (Name,Id)
In the code I have buttons triggering modals within this a foreach loop:
foreach (var item in Model.Arrangements)
{
...
}
Now I want to list the Interested players' names with a checkbox for each one. So I tried this expression:
Html.CheckBoxFor( m => m.Arrangements
.Where(x => x.JustPlayId == item.JustPlayId)
.Select(e => e.InterestedPlayers.Select(c => c.Name))
)
Any suggestions?