diff --git a/server/StrDss.Data/Repositories/RentalListingRepository.cs b/server/StrDss.Data/Repositories/RentalListingRepository.cs index fba887e1..18ea6814 100644 --- a/server/StrDss.Data/Repositories/RentalListingRepository.cs +++ b/server/StrDss.Data/Repositories/RentalListingRepository.cs @@ -146,13 +146,8 @@ public async Task GetGroupedRentalListingsCount(string? all, string? addres ApplyFilters(all, address, url, listingId, hostName, businessLicence, prRequirement, blRequirement, lgId, statusArray, reassigned, takedownComplete, ref query); var count = await query - .GroupBy(x => new { x.EffectiveBusinessLicenceNo, x.EffectiveHostNm, x.MatchAddressTxt }) - .Select(g => new RentalListingGroupDto - { - EffectiveBusinessLicenceNo = g.Key.EffectiveBusinessLicenceNo, - EffectiveHostNm = g.Key.EffectiveHostNm, - MatchAddressTxt = g.Key.MatchAddressTxt - }) + .Select(x => new { x.EffectiveBusinessLicenceNo, x.EffectiveHostNm, x.MatchAddressTxt }) + .Distinct() .CountAsync(); stopwatch.Stop();