Skip to content

Commit

Permalink
Update the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
sthsuyash committed Mar 1, 2024
1 parent 5883d39 commit cfbe7bb
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions 6th_Semester/NET_Centric_Computing/DatabaseConnection/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,30 @@ static void Main(string[] args)
Console.WriteLine("5. Exit");
Console.WriteLine("------------------------\n");

int choice = Convert.ToInt32(Console.ReadLine());
int choice;
do {
choice = Convert.ToInt32(Console.ReadLine());

switch (choice)
{
case 1:
databaseConnection.GetAllData();
return;
break;
case 2:
databaseConnection.GetDataById();
return;
break;
case 3:
databaseConnection.UpdateData();
return;
break;
case 4:
databaseConnection.DeleteData();
return;
break;
default:
Console.WriteLine("Please select the provided options.");
return;
break;
}

}while (choice > 4) ;
} while (choice != 5);
}
}
}

0 comments on commit cfbe7bb

Please sign in to comment.