private static void QueryFirearmsById()
        {
            FirearmRepositorySQL  firearmRepository = new FirearmRepositorySQL();
            IEnumerable <Firearm> matchingFirearms  = new List <Firearm>();
            int lowerId;
            int higherId;

            ConsoleView.GetIdQueryLowHiValues(out lowerId, out higherId);

            using (firearmRepository)
            {
                matchingFirearms = firearmRepository.QueryById(lowerId, higherId);
            }

            ConsoleView.DisplayQueryResults(matchingFirearms);
            ConsoleView.DisplayContinuePrompt();
        }
Esempio n. 2
0
        private static void QueryByDateBorn()
        {
            GreatPeopleRepositorySQL  greatPeopleRepository = new GreatPeopleRepositorySQL();
            IEnumerable <GreatPeople> matchingDate          = new List <GreatPeople>();
            int minimumDate;
            int maximumDate;

            ConsoleView.GetDateMinMaxValues(out minimumDate, out maximumDate);

            using (greatPeopleRepository)
            {
                matchingDate = greatPeopleRepository.QueryByDateBorn(minimumDate, maximumDate);
            }

            ConsoleView.DisplayQueryResults(matchingDate);
            Console.WriteLine();
            Console.WriteLine();
            Console.ForegroundColor = System.Drawing.Color.LawnGreen;
            ConsoleView.DisplayContinuePromptInvisible();
        }