示例#1
0
        // PUT: api/Location/
        public HttpResponseMessage Put([FromBody] Location value)
        {
            LocationPersistence lp = new LocationPersistence();
            String id;

            id = lp.editLocation(value);

            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created);

            response.Headers.Location = new Uri(Request.RequestUri, String.Format("/user/{0}", id));

            return(response);
        }
示例#2
0
        // GET: api/Location
        public ArrayList Get()
        {
            LocationPersistence lp = new LocationPersistence();

            return(lp.getallLocations());
        }
示例#3
0
        // GET: api/Location/5
        public ArrayList Get(string latitude, string longitude)
        {
            LocationPersistence lp = new LocationPersistence();

            return(lp.nearbyLocations(latitude, longitude));
        }
 public void GlobalSetup()
 {
     locationPersistence = LocationPersistence.Instance;
 }