// GET api/<controller> public List <Businesses> Get() { Businesses businesses = new Businesses(); List <Businesses> bList = businesses.Read(); return(bList); }
public HttpResponseMessage Get(int cusineId, int pr) { Businesses restaurant = new Businesses(); List <Businesses> campList = new List <Businesses>(); try { campList = restaurant.Read(cusineId, pr); return(Request.CreateResponse(HttpStatusCode.OK, campList)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } }