private static int Exist(int id) { while (true) { MedicineService medicine = new MedicineService(); if (medicine.Exist(id)) { return(id); //break; } Menu.RedText("Nie ma takiego leku w bazie, spróbój ponowanie"); id = int.Parse(Console.ReadLine()); } }