示例#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());
            }
        }
示例#2
0
 public IEnumerable <Race> GetAllRaces()
 {
     db.GetRaces();
     return(db.Races.Values);
 }