I have this slider inside a Razor Syntax foreach loop, there are about 20 images, I only want to take 5 out of the 20 images, and randomize every set of 5 images, below is the code, any help would be appreciated.
@foreach (var data in Model.BeaconsOfHope.Take(5))
{
<div class="swiper-slide">
<img class="pull-left" src="@data.image" />
<div class="pull-left donor-info">
<span class="name" style="font-weight:bold;">@data.name</span>
@*<span class="rank">@data.rank</span>*@
<span class="country">@data.country</span>
</div>
</div>
}