示例#1
0
        // GET api/<controller>
        public List <Businesses> Get()
        {
            Businesses        businesses = new Businesses();
            List <Businesses> bList      = businesses.Read();

            return(bList);
        }
示例#2
0
        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));
            }
        }