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()); }
public List <TrajectDTO> GetBuyableTrajecten(TrajectFilter filter) { return(_repositoryTraject.GetBuyableTrajecten(filter) .Select(traject => _trajectMapper.MapToDTO(traject)) .ToList()); }
public void SetUp() { trajectFilter = new TrajectFilter(); mapper = new TrajectMapper(); contextFilter = new ContextFilter(); }
public List <TrajectDTO> GetBuyableTrajecten([FromQuery] TrajectFilter filter) { return(_trajectFacade.GetBuyableTrajecten(filter)); }