Ejemplo n.º 1
0
 public IEnumerable <Stadion> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Stadions.ToList());
     }
 }
Ejemplo n.º 2
0
 //alle lijnen opvragen van een gebruiker
 public List <Winkelmandlijn> getLinesFromUser(string gebruikersID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Winkelmandlijnen.Where(x => x.gebruikerID == gebruikersID).ToList());
     }
 }
Ejemplo n.º 3
0
 public Ticket getTicketByID(int ticketID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Tickets.Where(x => x.ticketID == ticketID).FirstOrDefault());
     }
 }
Ejemplo n.º 4
0
 //één lijn opvragen
 public Winkelmandlijn getLineByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Winkelmandlijnen.Where(x => x.ID == id).FirstOrDefault());
     }
 }
Ejemplo n.º 5
0
 public IEnumerable <Gebruiker> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Gebruikers.ToList());
     }
 }
Ejemplo n.º 6
0
 public IEnumerable <Bestellijn> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Bestellijnen.ToList());
     }
 }
Ejemplo n.º 7
0
 public IEnumerable <Ticket> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Tickets.ToList());
     }
 }
Ejemplo n.º 8
0
 public Prijs getPriceByID(int?prijsID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Prijs.Where(x => x.prijsID == prijsID).FirstOrDefault());
     }
 }
Ejemplo n.º 9
0
 public List <Abo> getAbosByPloeg(int ploegID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Abonnementen.Where(x => x.ploegID == ploegID).ToList());
     }
 }
Ejemplo n.º 10
0
 public IEnumerable <Abo> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Abonnementen);
     }
 }
Ejemplo n.º 11
0
 public List <Ploeg> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Ploegen.ToList());
     }
 }
Ejemplo n.º 12
0
 //get prijzen per stadion
 public IEnumerable <Prijs> getPricesByStadion(int stadionID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Prijs.Where(x => x.stadionID == stadionID).OrderBy(x => x.stadionID).ThenBy(y => y.plaatsID).ToList());
     }
 }
Ejemplo n.º 13
0
 public IEnumerable <Wedstrijd> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Wedstrijden.ToList());
     }
 }
Ejemplo n.º 14
0
 public IEnumerable <Plaats> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Plaatsen.ToList());
     }
 }
Ejemplo n.º 15
0
 public Abo getAboByPloegPlaats(int ploegID, int plaatsID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Abonnementen.Where(x => x.ploegID == ploegID).Where(y => y.plaatsID == plaatsID).FirstOrDefault());
     }
 }
Ejemplo n.º 16
0
 public Abo getAboByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Abonnementen
                .Where(a => a.aboID == id).First());
     }
 }
Ejemplo n.º 17
0
 public Gebruiker getGebruikerByID(string id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Gebruikers
                .Where(g => g.gebruikerID == id).First());
     }
 }
Ejemplo n.º 18
0
 public IEnumerable <Ticket> getTicketByWedstrijd(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Tickets
                .Where(t => t.wedstrijdID == id).ToList());
     }
 }
Ejemplo n.º 19
0
 public Wedstrijd getWedstrijdByDateStadion(DateTime d, int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Wedstrijden
                .Where(w => w.date == d && w.stadionID == id).First());
     }
 }
Ejemplo n.º 20
0
 public Wedstrijd getWedstrijdByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Wedstrijden
                .Where(w => w.wedstrijdID == id).First());
     }
 }
Ejemplo n.º 21
0
 public void Update(Gebruiker entity)
 {
     using (var db = new VoetbalContext())
     {
         db.Entry(entity).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 22
0
 public IEnumerable <Bestelling> getBestellingByGebruiker(string id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Bestellingen
                .Where(b => b.gebruikerID == id).ToList());
     }
 }
Ejemplo n.º 23
0
 public Bestellijn getBestellijnByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Bestellijnen
                .Where(b => b.BestellijnID == id).First());
     }
 }
Ejemplo n.º 24
0
 public Gebruiker getGebruikerByVoornaamFamilienaam(string vn, string fn)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Gebruikers
                .Where(g => g.voornaam == vn && g.familienaam == fn).First());
     }
 }
Ejemplo n.º 25
0
 public Plaats getPlaatsByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Plaatsen
                .Where(p => p.plaatsID == id).First());
     }
 }
Ejemplo n.º 26
0
 public Ploeg getPloegByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Ploegen
                .Where(p => p.ploegID == id).First());
     }
 }
Ejemplo n.º 27
0
 public IEnumerable <Bestellijn> getBestellijnByBestelling(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Bestellijnen
                .Where(b => b.bestellingID == id).ToList());
     }
 }
Ejemplo n.º 28
0
 public Stadion getStadionByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Stadions
                .Where(s => s.stadionID == id).First());
     }
 }
Ejemplo n.º 29
0
 public void Create(Bestellijn entity)
 {
     using (var db = new VoetbalContext())
     {
         db.Entry(entity).State = EntityState.Added;
         db.SaveChanges();
     }
 }
Ejemplo n.º 30
0
 //één lijn verwijderen
 public void DeleteLine(Winkelmandlijn line)
 {
     using (var db = new VoetbalContext())
     {
         db.Entry(line).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }