static void Main(string[] args) { Console.WriteLine("Welcome to the Password Manager!!! Version: 1.0"); try { if (!context.Auths.Any()) { Console.WriteLine("Please, create a new auth account"); AuthUtil.CreateAuth(authController); } //var context = new DataContext(); Menu(); } catch (Exception exception) { Console.WriteLine($"An error has ocurred: {exception.Message}"); Menu(); } }
static void MenuOption(string option) { try { if (option == "1") { LoginUtil.ListAllLogins(controller); } else if (option == "2") { LoginUtil.FindSpecificLogin(controller, authController); } else if (option == "3") { LoginUtil.CreateNewLogin(controller); } else if (option == "4") { Console.WriteLine("Be careful, the new auth, will be able to see all the passwords!!!"); AuthUtil.CheckIfAuth(authController); AuthUtil.CreateAuth(authController); } else if (option == "5") { Console.WriteLine("Thanks for use the app!!!"); } else { Menu(); } } catch (Exception exception) { Console.WriteLine($"Sorry, an error has ocurred: {exception.Message}"); Menu(); } }