public List <Bestilling> alleBestillinger() { using (var db = new BestillingContext()) { List <Bestilling> alleBestillinger = db.Bestillinger.Select(k => new Bestilling { id = k.Id, fraLokasjon = k.FraLokasjon, tilLokasjon = k.TilLokasjon, bilettType = k.BilettType, reisende = k.Reisende, reisendeAntall = k.AntallReisende, spesialBehov = k.SpesialBehov, kundeId = k.Kunder.Id }).ToList(); return(alleBestillinger); } }
public AvgangRepository(BestillingContext db, ILogger <AvgangRepository> log) { _log = log; _db = db; }
public BestillingRepository(BestillingContext db, ILogger <BestillingRepository> log) { _db = db; _log = log; }
public StasjonRepository(BestillingContext db, ILogger <StasjonRepository> log) { _log = log; _db = db; }
public BrukerRepository(BestillingContext db, ILogger <BrukerRepository> log) { _log = log; _db = db; }
public RuteRepository(BestillingContext db, ILogger <RuteRepository> log) { _log = log; _db = db; }