public async Task <IHttpActionResult> PostLocation() { DateTime time = DateTime.Now; TrackersHandler TH = new TrackersHandler(db); TrackerLocationsHandler TLH = new TrackerLocationsHandler(db); SpacesHandler SH = new SpacesHandler(db); KnnsHandler KH = new KnnsHandler(db); string resultString = Request.Content.ReadAsStringAsync().Result.Trim(); KeyValuePair <int, KeyValuePair <Guid, List <double> > > coordinates = LocationParser(resultString); Knn Knn = KH.GetKnn(coordinates.Value.Key); byte[] options = Classify.ClassifyTemplate(coordinates.Value.Value, Knn); Tracker tracker = TH.GetTracker(coordinates.Key); TrackerLocation loc = new TrackerLocation(time, options, tracker); TLH.PostTrackerLocation(loc); return(Ok(Classify.ClassifyTemplate(coordinates.Value.Value, Knn))); }