예제 #1
0
        public List <Traject> GetTrajecten(TrajectFilter filter)
        {
            IQueryable <Product> query = _context.Trajecten.Include(a => a.Cursussen);

            query = _sortFilter.Filter(filter, query);
            return(query.Select(traject => new Traject {
                Beschrijving = traject.Beschrijving,
                Categorie = traject.Categorie,
                FotoURLCard = traject.FotoURLCard,
                IsBuyable = traject.IsBuyable,
                Cursussen = (traject as Traject).Cursussen,
                ID = traject.ID,
                LangeBeschrijving = traject.LangeBeschrijving,
                Prijs = traject.Prijs,
                Titel = traject.Titel,
                Type = traject.Type,
                OrderNumber = traject.OrderNumber
            }).ToList());
        }
예제 #2
0
 public List <TrajectDTO> GetBuyableTrajecten(TrajectFilter filter)
 {
     return(_repositoryTraject.GetBuyableTrajecten(filter)
            .Select(traject => _trajectMapper.MapToDTO(traject))
            .ToList());
 }
예제 #3
0
 public void SetUp()
 {
     trajectFilter = new TrajectFilter();
     mapper        = new TrajectMapper();
     contextFilter = new ContextFilter();
 }
예제 #4
0
 public List <TrajectDTO> GetBuyableTrajecten([FromQuery] TrajectFilter filter)
 {
     return(_trajectFacade.GetBuyableTrajecten(filter));
 }