using System.Reflection.Emit; using System.Runtime.InteropServices.ComTypes; using System.Text; using System.Threading.Channels; using LootBoxSimulator.Models.DAO; RemoteDatabaseContext db = new RemoteDatabaseContext(); 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)) { Console.WriteLine("Please enter a valid number"); return; } 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; }