// 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); }
// GET: api/Location public ArrayList Get() { LocationPersistence lp = new LocationPersistence(); return(lp.getallLocations()); }
// 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; }