31 lines
713 B
C#
31 lines
713 B
C#
namespace Demo.UI
|
|
{
|
|
public class MainMenuUI
|
|
{
|
|
|
|
UserConsoleUI _userConsoleUI;
|
|
|
|
public MainMenuUI(UserUseCase userUseCase) {
|
|
_userConsoleUI = new UserConsoleUI(userUseCase);
|
|
DisplayMenu();
|
|
|
|
}
|
|
|
|
private void DisplayMenu() {
|
|
while (true)
|
|
{
|
|
switch (Console.ReadLine())
|
|
{
|
|
case "1": _userConsoleUI.DisplayAllUsers(); break;
|
|
case "2": _userConsoleUI.RemoveUserByGuid(Guid.Parse(Console.ReadLine())); break;
|
|
|
|
default: DisplayMenu();
|
|
break;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|