I want to select five item one from each category which are having lowest cost, i am getting an error please help me with this
var packageId = objentity.PackageGalleries.
Where(p => p.ParentCategory != "Indian"
&& p.ParentCategory != "International").
OrderBy(p => p.PackageCost)
.GroupBy(p => p.ParentCategory).FirstOrDefault();
it is only selecting one item from one category
In the view i m passing
@foreach (var item in Model)
{
<a href="javascript:;">
<img src="~/Content/JetJourney/img/@item.FileName" />
<div>
<p>@item.PackageName, Starting Price @item.PackageCost *</p>
<br />
</div>
</a>
}