public IEnumerable <Driver> GetAllDrivers() { try { db.GetDrivers(); return(db.Drivers.Values); } catch (Exception) { throw; } }
protected void btnLoadDrivers_Click(object sender, EventArgs e) { DbTools db = new DbTools(); GridView1.DataSource = db.GetDrivers().Values; GridView1.DataBind(); }
private void FormMain_Load(object sender, EventArgs e) { db = new DbTools(); db.GetCountries(); db.GetDrivers(); teams = new BindingList <Team>(db.LoadTeams()); listBoxTeam.DataSource = teams; }
public IHttpActionResult GetDriver(int id) { db.GetDrivers(); if (db.Drivers[id] == null) { return(NotFound()); } return(Ok(db.Drivers[id])); }
public IEnumerable <Driver> GetAllDrivers() { return(db.GetDrivers().Values); }