private static void ViewSerie() { int id; Console.WriteLine("View series"); Console.Write("Enter the series id: "); if (!(int.TryParse(Console.ReadLine(), out id) && id < repository.NextId())) { Console.WriteLine(); Console.WriteLine("- Invalid id, try again."); return; } Console.WriteLine(); Console.WriteLine(repository.ReturnById(id)); }