Skip to content

Commit

Permalink
Merge pull request #807 from bcgov/yj
Browse files Browse the repository at this point in the history
chore: peformance
  • Loading branch information
ychung-mot authored Nov 21, 2024
2 parents 62a8cde + c8a200c commit 5c4427f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 5 additions & 6 deletions server/StrDss.Data/Repositories/RentalListingRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,17 @@ public async Task<PagedDto<RentalListingGroupDto>> GetGroupedRentalListings(stri
ApplyFilters(all, address, url, listingId, hostName, businessLicence, prRequirement, blRequirement, lgId, statusArray, reassigned, takedownComplete, ref query);

var groupedQuery = query
.GroupBy(x => new { x.EffectiveBusinessLicenceNo, x.EffectiveHostNm, x.MatchAddressTxt })
.Select(g => new RentalListingGroupDto
.Select(x => new RentalListingGroupDto
{
EffectiveBusinessLicenceNo = g.Key.EffectiveBusinessLicenceNo,
EffectiveHostNm = g.Key.EffectiveHostNm,
MatchAddressTxt = g.Key.MatchAddressTxt
EffectiveBusinessLicenceNo = x.EffectiveBusinessLicenceNo,
EffectiveHostNm = x.EffectiveHostNm,
MatchAddressTxt = x.MatchAddressTxt
})
.Distinct()
.AsNoTracking();

var extraSort = "";


var groupedListings = await Page<RentalListingGroupDto, RentalListingGroupDto>(groupedQuery, pageSize, pageNumber, orderBy, direction, extraSort, false);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class JurisdictionUpdateDto
public bool? IsBusinessLicenceRequired { get; set; }
public string? EconomicRegionDsc { get; set; }
public bool? IsStraaExempt { get; set; }
public bool? IsActive { get; set; }
public DateTime UpdDtm { get; set; }
}
}

0 comments on commit 5c4427f

Please sign in to comment.