public IHttpActionResult GetAllTheaters() { using (var dbcontext = new BroadwayBuilderContext()) { TheaterService service = new TheaterService(dbcontext); try { IEnumerable list = service.GetAllTheaters(); return(Content((HttpStatusCode)200, list)); } catch (Exception e) { return(Content((HttpStatusCode)500, "Oops! Something went wrong on our end")); } } }