// GET api/User/x09782
        // finds the user and returns all other users with the same Interest_1
        public IEnumerable<User> GetUser(string id)
        {
            User user = db.Users.Find(id);                          //find the user by ID in the DB
            if (user == null)                                       //if none found Exception
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
            }

            UserInfo userInfo = new UserInfo();                                         
            IEnumerable<User> userIntrest = userInfo.FindMatch(user.Interest_1);        //Uses the FindMatch method to return all users with the same interest_1

            return userIntrest;
        }
Example #2
0
 public void Cleanup()
 {
     user = null;
 }
Example #3
0
 public void Initialize()
 {
     user = new UserInfo();
 }