public IHttpActionResult Get(int?id) { if (id == null) { return(BadRequest()); } LeagueService service = CreateLeagueService(); return(Ok(service.GetLeagueByID(id.Value))); }