// GET api/apps?id=app_id public HttpResponseMessage Get(string id) { MobileAppResponse response = new MobileAppResponse(); // List of Apps Found with that given ID List <AppModel> result = new List <AppModel> (); using (MongoDBRepository mongoHandler = new MongoDBRepository()) { // Is the App Already on The Database ? if (!mongoHandler.IsAppOnTheDatabase(id)) { response.error = false; response.statusMessage = String.Format("App Id {0} could not be found On the Database.", id); response.appsFound = null; // NotModified Response Code return(Request.CreateResponse(HttpStatusCode.NotFound, response, GetFormatter())); } // Finding The Apps result.AddRange(mongoHandler.FindAppsByID(id)); } // Filling Up Web Response response.error = false; response.statusMessage = String.Empty; response.appsFound = result; return(Request.CreateResponse(HttpStatusCode.OK, response, GetFormatter())); }