Esempio n. 1
0
        public IHttpActionResult GetRace(int id)
        {
            try
            {
                db.GetRaces();
                if (db.Races[id] == null)
                {
                    return(NotFound());
                }

                return(Ok(db.Races[id]));
            }
            catch (Exception)
            {
                return(NotFound());
            }
        }
Esempio n. 2
0
 public IEnumerable <Race> GetAllRaces()
 {
     db.GetRaces();
     return(db.Races.Values);
 }