public int Locations() { using IPizzaboxRepository pizzaboxRepository = DbOptions.CreatePizzaboxRepository(); var results = pizzaboxRepository.GetAllStores(); //*** if (results.Count() == 0) { bool flag = false; Console.WriteLine("We are still in construction. We should be finished soon."); Console.WriteLine("Would you like to sign up for updates?"); Console.Write("Enter (Y/N): "); string answer = Console.ReadLine(); bool updates = false; Console.Clear(); switch (answer.ToLower()) { case "y": case "yes": case "sure": case "alright": case "ok": case "okay": updates = true; break; case "n": case "no": case "nah": case "nope": case "no thank you": case "no thanks": case "im good": case "i'm good": case "im ok": case "i'm ok": case "im okay": case "i'm okay": default: break; } if (updates) { do { if (flag) { Console.WriteLine("*Make sure your email contains '@' and ends with an extension (e.g .com)"); Console.WriteLine("If you would like to navigate back, just leave it blank or enter anything that could be interpreted as 'go back'"); flag = false; } Console.Write("Enter Email: "); answer = Console.ReadLine(); switch (answer.ToLower()) { case "back": case "go back": case "that way": case "<<<-": case "<<-": case "<-": case "<<<": case "<<": case "<": case "-": case "..": case "/..": case "previous": case "": return(0); } if (!answer.Contains("@") || answer[answer.Length - 4] != '.') { Console.Clear(); Console.WriteLine("Email Invalid Format"); flag = true; } else { Console.WriteLine("You have successfully signed up for updates."); Console.WriteLine(); return(0); } } while (answer.Length > 0); } return(0); } foreach (Store s in results) { if (s.City.Length < 9) { Console.Write(s.StoreId + "\t" + s.City); for (int i = 0; i < 9 - s.City.Length; i++) { Console.Write(" "); } Console.WriteLine("\t" + s.State + "\t" + s.Zip); } else { Console.WriteLine(s.StoreId + "\t" + s.City + "\t" + s.State + "\t" + s.Zip); } //count++; } Console.WriteLine(); return(results.Count()); } //!!! Marked for refinement