/// <summary> /// Pobiera listę obiektów typu CarServicesCar dla określonego serwisu. /// </summary> /// <param name="carService">Szukany serwis.</param> public ICollection <CarServicesCar> GetCarServicesCarCollection(CarService carService) { CarServiceSearchCriteria searchCriteria = new CarServiceSearchCriteria(); return(this.DB.CarServicesCars .AsExpandable() .Where(searchCriteria.GetFilterExpressionForCarServicesCar(carService)) .ToList()); }
/// <summary> /// Tworzy Expression na podstawie danych search criteria. /// </summary> /// <returns>Expression.</returns> public Expression <Func <CarServicesCar, bool> > GetFilterExpressionForCarServicesCar(CarService carService) { Expression <Func <CarServicesCar, bool> > filter = PredicateBuilder.True <CarServicesCar>(); filter = filter.And(x => x.CarServiceId.Equals(carService.Id)); return(filter); }
/// <summary> /// Tworzy Expression na podstawie danych search criteria. /// </summary> /// <returns>Expression.</returns> public Expression <Func <HandledCarProduct, bool> > GetFilterExpressionForHandledCarProduct(CarService carService) { Expression <Func <HandledCarProduct, bool> > filter = PredicateBuilder.True <HandledCarProduct>(); filter = filter.And(x => x.CarServiceId.Equals(carService.Id)); return(filter); }