Пример #1
0
 public IEnumerable <Stadion> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Stadions.ToList());
     }
 }
Пример #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());
     }
 }
Пример #3
0
 public Ticket getTicketByID(int ticketID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Tickets.Where(x => x.ticketID == ticketID).FirstOrDefault());
     }
 }
Пример #4
0
 //één lijn opvragen
 public Winkelmandlijn getLineByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Winkelmandlijnen.Where(x => x.ID == id).FirstOrDefault());
     }
 }
Пример #5
0
 public IEnumerable <Gebruiker> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Gebruikers.ToList());
     }
 }
Пример #6
0
 public IEnumerable <Bestellijn> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Bestellijnen.ToList());
     }
 }
Пример #7
0
 public IEnumerable <Ticket> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Tickets.ToList());
     }
 }
Пример #8
0
 public Prijs getPriceByID(int?prijsID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Prijs.Where(x => x.prijsID == prijsID).FirstOrDefault());
     }
 }
Пример #9
0
 public List <Abo> getAbosByPloeg(int ploegID)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Abonnementen.Where(x => x.ploegID == ploegID).ToList());
     }
 }
Пример #10
0
 public IEnumerable <Abo> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Abonnementen);
     }
 }
Пример #11
0
 public List <Ploeg> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Ploegen.ToList());
     }
 }
Пример #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());
     }
 }
Пример #13
0
 public IEnumerable <Wedstrijd> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Wedstrijden.ToList());
     }
 }
Пример #14
0
 public IEnumerable <Plaats> All()
 {
     using (var db = new VoetbalContext())
     {
         return(db.Plaatsen.ToList());
     }
 }
Пример #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());
     }
 }
Пример #16
0
 public Abo getAboByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Abonnementen
                .Where(a => a.aboID == id).First());
     }
 }
Пример #17
0
 public Gebruiker getGebruikerByID(string id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Gebruikers
                .Where(g => g.gebruikerID == id).First());
     }
 }
Пример #18
0
 public IEnumerable <Ticket> getTicketByWedstrijd(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Tickets
                .Where(t => t.wedstrijdID == id).ToList());
     }
 }
Пример #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());
     }
 }
Пример #20
0
 public Wedstrijd getWedstrijdByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Wedstrijden
                .Where(w => w.wedstrijdID == id).First());
     }
 }
Пример #21
0
 public void Update(Gebruiker entity)
 {
     using (var db = new VoetbalContext())
     {
         db.Entry(entity).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Пример #22
0
 public IEnumerable <Bestelling> getBestellingByGebruiker(string id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Bestellingen
                .Where(b => b.gebruikerID == id).ToList());
     }
 }
Пример #23
0
 public Bestellijn getBestellijnByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Bestellijnen
                .Where(b => b.BestellijnID == id).First());
     }
 }
Пример #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());
     }
 }
Пример #25
0
 public Plaats getPlaatsByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Plaatsen
                .Where(p => p.plaatsID == id).First());
     }
 }
Пример #26
0
 public Ploeg getPloegByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Ploegen
                .Where(p => p.ploegID == id).First());
     }
 }
Пример #27
0
 public IEnumerable <Bestellijn> getBestellijnByBestelling(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Bestellijnen
                .Where(b => b.bestellingID == id).ToList());
     }
 }
Пример #28
0
 public Stadion getStadionByID(int id)
 {
     using (var db = new VoetbalContext())
     {
         return(db.Stadions
                .Where(s => s.stadionID == id).First());
     }
 }
Пример #29
0
 public void Create(Bestellijn entity)
 {
     using (var db = new VoetbalContext())
     {
         db.Entry(entity).State = EntityState.Added;
         db.SaveChanges();
     }
 }
Пример #30
0
 //één lijn verwijderen
 public void DeleteLine(Winkelmandlijn line)
 {
     using (var db = new VoetbalContext())
     {
         db.Entry(line).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }