From 5c18342cf88a1a4aa2adc0c13c6d54b682ce2de9 Mon Sep 17 00:00:00 2001 From: Daria Kravchuk Date: Tue, 10 Sep 2024 08:35:31 +0300 Subject: [PATCH] added ToList() to ensure streetcodes are retrieved as a list --- .../GetPageMainPage/GetPageOfStreetcodesMainPageHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetPageMainPage/GetPageOfStreetcodesMainPageHandler.cs b/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetPageMainPage/GetPageOfStreetcodesMainPageHandler.cs index c2d299e2f..9afc4b0b7 100644 --- a/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetPageMainPage/GetPageOfStreetcodesMainPageHandler.cs +++ b/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetPageMainPage/GetPageOfStreetcodesMainPageHandler.cs @@ -38,7 +38,7 @@ public async Task>> Handle(GetPageOfSt predicate: sc => sc.Status == DAL.Enums.StreetcodeStatus.Published, include: src => src.Include(item => item.Text).Include(item => item.Images).ThenInclude(x => x.ImageDetails), descendingSortKeySelector: sc => sc.CreatedAt) - .Entities; + .Entities.ToList(); if (streetcodes is not null && streetcodes.Any()) {