public ActionResult Index(int? minAge, int? maxAge, string FindGender, string InterestedIn, string sortVal, string address)
        {
            Builder b = new Builder();
            UserSort sortBy;
            switch (sortVal)
            {
            case "Newest": sortBy=UserSort.LastJoin;
                 break;
            case "Best Match": sortBy=UserSort.Match;
                 break;
                case "Activity Date": sortBy=UserSort.LastLog;
                break;
            default: sortBy=UserSort.Match;
                 break;  
            }
            int MIN_AGE = (minAge == null) ? 18 : Convert.ToInt32(minAge);
            int MAX_AGE = (maxAge == null) ? 120 : Convert.ToInt32(maxAge);
            List<User> users = b.queryUsers(minAge: MIN_AGE, maxAge: MAX_AGE, gender: FindGender == "Men", InterestedIn: InterestedIn == "Men", address: address, SearcherID: User.Identity.GetUserId(), sortBy: sortBy);
            ViewBag.minAge = minAge;
            ViewBag.maxAge = maxAge;
            ViewBag.address = (address=="")?null :address;
            ViewBag.sortOptions = SortOptions;
            ViewBag.InterestedIn = InterestedIn;
            ViewBag.FindGender = FindGender;
            ViewBag.Automatch = false;
            return View(users);



        }
        public ActionResult Index(bool isAutoMatch=false)
        {
            Builder b = new Builder();
            User currentUser = b.getCurrentUser(User.Identity.GetUserId());
            string address;
            bool InterestedIn;
            bool gender;
            if (currentUser == null)
            {//set default values for Identity-YAT unsynced test user
                address = "94104";
                InterestedIn = true;
                gender = true;
            }
            else
            {
                gender = currentUser.Gender;
                address = currentUser.Address;
                InterestedIn = currentUser.InterestedIn;
            }

            List<User> users = b.queryUsers(minAge: 20, maxAge: 30, gender: InterestedIn, InterestedIn: gender, address: address, SearcherID: User.Identity.GetUserId(), sortBy: 0);
            ViewBag.minAge =20;
            ViewBag.maxAge = 35;
            ViewBag.address = address;
            ViewBag.sortOptions = SortOptions;
            ViewBag.InterestedIn = InterestedIn;
            ViewBag.Automatch = isAutoMatch;
                //new SelectList(new[] { "Best Match", "Activity Date","Newest" });
            return View(users);
        }
        static void Main(string[] args)
        {
            Builder b = new Builder();
            b.putData();
            b.userGenerator(300);
            b.getData();

            Console.WriteLine("ANALYTICS");
            Analytics a = new Analytics();
            a.movieRank();
            a.genderCount();
            a.ageRank();
            a.registrationMonths();
            a.stateCount();
            Console.WriteLine();

            Console.WriteLine("SORTING");
            qryTester(UserSort.LastJoin);
            qryTester(UserSort.LastLog);
            qryTester(UserSort.Match);

            //unable to read file in builderlayer
            //makeZipBinary(Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory())), "zips.csv"));

            Console.WriteLine("\nDone!");
            Console.ReadKey();
        }
 public void Configuration(IAppBuilder app)
 {
     Builder builder = new Builder();
     builder.putData();
     builder.userGenerator(50);
     builder.getData();
     
     ConfigureAuth(app);
     
 }
        public List<User> qryTester(UserSort sortby)
        {

            Builder b = new Builder();

            //Test searching users
            List<User> users = b.queryUsers(minAge: 20, maxAge: 50, gender: false, InterestedIn: true, address:"", SearcherID: "1", sortBy: 0);
            return users;

        }
        public static void qryTester(UserSort sortby)
        {

            Builder b = new Builder();

            //Test searching users
    
            List<User> users = b.queryUsers(minAge: 20, maxAge: 30, gender: true, InterestedIn: false, address: "", SearcherID: "1", sortBy: 0);
            foreach (User user in users)
            {
                Console.WriteLine(user.FirstName + " " + user.LastName);
            }

        }