2024-12-16 06:29:02 +00:00
|
|
|
|
using System.Reflection.Emit;
|
|
|
|
|
using System.Runtime.InteropServices.ComTypes;
|
2024-12-16 13:07:23 +00:00
|
|
|
|
using System.Text;
|
2024-12-16 11:24:55 +00:00
|
|
|
|
using System.Threading.Channels;
|
2024-12-16 06:29:02 +00:00
|
|
|
|
using LootBoxSimulator.Models.DAO;
|
2024-12-05 11:29:52 +00:00
|
|
|
|
|
|
|
|
|
RemoteDatabaseContext db = new RemoteDatabaseContext();
|
2024-12-16 13:07:23 +00:00
|
|
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
|
|
|
stringBuilder.Append("1. Print category");
|
|
|
|
|
stringBuilder.AppendLine();
|
|
|
|
|
stringBuilder.Append("2. Print rate");
|
|
|
|
|
stringBuilder.AppendLine();
|
|
|
|
|
stringBuilder.Append("3. Print items");
|
|
|
|
|
Console.WriteLine(stringBuilder.ToString());
|
|
|
|
|
if (!int.TryParse(Console.ReadLine(), out int menuPosition))
|
2024-12-16 06:29:02 +00:00
|
|
|
|
{
|
2024-12-16 13:07:23 +00:00
|
|
|
|
Console.WriteLine("Please enter a valid number");
|
|
|
|
|
return;
|
2024-12-16 11:24:55 +00:00
|
|
|
|
}
|
2024-12-16 13:07:23 +00:00
|
|
|
|
|
|
|
|
|
switch (menuPosition)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
foreach (var categoryDao in db.Categories)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine($"Id: {categoryDao.Id} Name: {categoryDao.Name}");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 2: break;
|
|
|
|
|
default:
|
|
|
|
|
Console.WriteLine("Unkown Menu Position");
|
|
|
|
|
break;
|
|
|
|
|
}
|