public IHttpActionResult GetRace(int id) { try { db.GetRaces(); if (db.Races[id] == null) { return(NotFound()); } return(Ok(db.Races[id])); } catch (Exception) { return(NotFound()); } }
public IEnumerable <Race> GetAllRaces() { db.GetRaces(); return(db.Races.Values); }