public IEnumerable <Stadion> All() { using (var db = new VoetbalContext()) { return(db.Stadions.ToList()); } }
//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()); } }
public Ticket getTicketByID(int ticketID) { using (var db = new VoetbalContext()) { return(db.Tickets.Where(x => x.ticketID == ticketID).FirstOrDefault()); } }
//één lijn opvragen public Winkelmandlijn getLineByID(int id) { using (var db = new VoetbalContext()) { return(db.Winkelmandlijnen.Where(x => x.ID == id).FirstOrDefault()); } }
public IEnumerable <Gebruiker> All() { using (var db = new VoetbalContext()) { return(db.Gebruikers.ToList()); } }
public IEnumerable <Bestellijn> All() { using (var db = new VoetbalContext()) { return(db.Bestellijnen.ToList()); } }
public IEnumerable <Ticket> All() { using (var db = new VoetbalContext()) { return(db.Tickets.ToList()); } }
public Prijs getPriceByID(int?prijsID) { using (var db = new VoetbalContext()) { return(db.Prijs.Where(x => x.prijsID == prijsID).FirstOrDefault()); } }
public List <Abo> getAbosByPloeg(int ploegID) { using (var db = new VoetbalContext()) { return(db.Abonnementen.Where(x => x.ploegID == ploegID).ToList()); } }
public IEnumerable <Abo> All() { using (var db = new VoetbalContext()) { return(db.Abonnementen); } }
public List <Ploeg> All() { using (var db = new VoetbalContext()) { return(db.Ploegen.ToList()); } }
//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()); } }
public IEnumerable <Wedstrijd> All() { using (var db = new VoetbalContext()) { return(db.Wedstrijden.ToList()); } }
public IEnumerable <Plaats> All() { using (var db = new VoetbalContext()) { return(db.Plaatsen.ToList()); } }
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()); } }
public Abo getAboByID(int id) { using (var db = new VoetbalContext()) { return(db.Abonnementen .Where(a => a.aboID == id).First()); } }
public Gebruiker getGebruikerByID(string id) { using (var db = new VoetbalContext()) { return(db.Gebruikers .Where(g => g.gebruikerID == id).First()); } }
public IEnumerable <Ticket> getTicketByWedstrijd(int id) { using (var db = new VoetbalContext()) { return(db.Tickets .Where(t => t.wedstrijdID == id).ToList()); } }
public Wedstrijd getWedstrijdByDateStadion(DateTime d, int id) { using (var db = new VoetbalContext()) { return(db.Wedstrijden .Where(w => w.date == d && w.stadionID == id).First()); } }
public Wedstrijd getWedstrijdByID(int id) { using (var db = new VoetbalContext()) { return(db.Wedstrijden .Where(w => w.wedstrijdID == id).First()); } }
public void Update(Gebruiker entity) { using (var db = new VoetbalContext()) { db.Entry(entity).State = EntityState.Modified; db.SaveChanges(); } }
public IEnumerable <Bestelling> getBestellingByGebruiker(string id) { using (var db = new VoetbalContext()) { return(db.Bestellingen .Where(b => b.gebruikerID == id).ToList()); } }
public Bestellijn getBestellijnByID(int id) { using (var db = new VoetbalContext()) { return(db.Bestellijnen .Where(b => b.BestellijnID == id).First()); } }
public Gebruiker getGebruikerByVoornaamFamilienaam(string vn, string fn) { using (var db = new VoetbalContext()) { return(db.Gebruikers .Where(g => g.voornaam == vn && g.familienaam == fn).First()); } }
public Plaats getPlaatsByID(int id) { using (var db = new VoetbalContext()) { return(db.Plaatsen .Where(p => p.plaatsID == id).First()); } }
public Ploeg getPloegByID(int id) { using (var db = new VoetbalContext()) { return(db.Ploegen .Where(p => p.ploegID == id).First()); } }
public IEnumerable <Bestellijn> getBestellijnByBestelling(int id) { using (var db = new VoetbalContext()) { return(db.Bestellijnen .Where(b => b.bestellingID == id).ToList()); } }
public Stadion getStadionByID(int id) { using (var db = new VoetbalContext()) { return(db.Stadions .Where(s => s.stadionID == id).First()); } }
public void Create(Bestellijn entity) { using (var db = new VoetbalContext()) { db.Entry(entity).State = EntityState.Added; db.SaveChanges(); } }
//één lijn verwijderen public void DeleteLine(Winkelmandlijn line) { using (var db = new VoetbalContext()) { db.Entry(line).State = EntityState.Deleted; db.SaveChanges(); } }