public IHttpActionResult SearchByPrice(PriceSearchRequestDto dto) { ISearchingCriterion <Offer> criterion = OffersSearchingCriteriaFactory.CreatePriceSearchingCriterion(dto.MinimalPrice, dto.MaximalPrice); return(Search(dto.Username, new[] { criterion }, dto.SortType, dto.SortBy)); }
public IHttpActionResult SearchByPlace(PlaceSearchRequestDto dto) { ISearchingCriterion <Offer> criterion = OffersSearchingCriteriaFactory.CreatePlaceSearchingCriterion(dto.PlaceName, dto.CityName); return(Search(dto.Username, new [] { criterion }, dto.SortType, dto.SortBy)); }
public IList <OfferViewModel> SearchByPrice(IAccommodationContext context, PriceSearchingModel model) { ISearchingCriterion <Offer> criterion = OffersSearchingCriteriaFactory.CreatePriceSearchingCriterion(PriceFromString(model.MinimalPrice), PriceFromString(model.MaximalPrice)); return(Search(context, model.Username, new[] { criterion }, model.SortType, model.SortBy)); }
public IList <OfferViewModel> SearchByPlace(IAccommodationContext context, PlaceSearchingModel model) { ISearchingCriterion <Offer> criterion = OffersSearchingCriteriaFactory.CreatePlaceSearchingCriterion(model.PlaceName, model.CityName); return(Search(context, model.Username, new[] { criterion }, model.SortType, model.SortBy)); }
public IHttpActionResult SearchByDate(DateSearchRequestDto dto) { ISearchingCriterion <Offer> criterion = OffersSearchingCriteriaFactory.CreateDateSearchingCriterion(dto.MinimalDate, dto.MaximalDate, dto.ShowPartiallyMatchingResults); return(Search(dto.Username, new[] { criterion }, dto.SortType, dto.SortBy)); }
public IList <OfferViewModel> SearchByDate(IAccommodationContext context, DateSearchingModel model) { ISearchingCriterion <Offer> criterion = OffersSearchingCriteriaFactory.CreateDateSearchingCriterion(model.MinimalDate, model.MaximalDate, model.ShowPartiallyMatchingResults); return(Search(context, model.Username, new[] { criterion }, model.SortType, model.SortBy)); }