Skip to content

Commit

Permalink
Smallfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ReallyWeirdCat committed Nov 17, 2024
1 parent a9c0b97 commit dd22010
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TourService/Services/TourService/TourService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public IQueryable<TourDto> GetTours(GetToursRequest getTours)
.Where(tt => getTours.TourTags.Contains(tt.TagId))
.Select(tt => tt.TourId);

var tours = allTours
tours = allTours
.Where(t => selectedCategories.Contains(t.Id) && selectedTags.Contains(t.Id))
.Where(t => t.Rating >= getTours.MinimalRating && t.Rating <= getTours.MaximalRating)
.Where(t => t.Price >= getTours.MinimalPrice && t.Price <= getTours.MaximalPrice)
Expand All @@ -123,7 +123,7 @@ public IQueryable<TourDto> GetTours(GetToursRequest getTours)
}
else if(getTours.Categories!=null)
{
var tours = _unitOfWork.Tours.GetAll()
tours = _unitOfWork.Tours.GetAll()
.Where(t =>
_unitOfWork.TourCategories.GetAll()
.Where(tc => getTours.Categories.Contains(tc.CategoryId))
Expand All @@ -139,7 +139,7 @@ public IQueryable<TourDto> GetTours(GetToursRequest getTours)
}
else if(getTours.TourTags!=null)
{
var tours = _unitOfWork.Tours.GetAll()
tours = _unitOfWork.Tours.GetAll()
.Where(t =>
_unitOfWork.TourTags.GetAll()
.Where(tt => getTours.TourTags.Contains(tt.TagId))
Expand Down

0 comments on commit dd22010

Please sign in to comment.