/// <summary> /// Prints out all the genres in the Genre table of the database /// </summary> public static void GetGenres() { List <Genre> genres = DALManager.GetGenres(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Genres\n"); Console.ForegroundColor = ConsoleColor.White; foreach (Genre item in genres) { Console.WriteLine(item.Type); } Console.WriteLine(); }
/// <summary> /// Deletes a genre fitting the usergiven genre name, and then prints out the updates list of genres /// </summary> /// <param name="search"></param> public static void DeleteGenre(string search) { DALManager.DeleteGenre(search); List <Genre> genres = DALManager.GetGenres(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Updated list of Genres\n"); Console.ForegroundColor = ConsoleColor.White; foreach (Genre item in genres) { Console.WriteLine(item.Type); } Console.WriteLine(); }
/// <summary> /// Inserts the usergiven genre to the Genre table and prints out the update list of genres /// </summary> /// <param name="type"></param> public static void InsertGenre(String type) { Console.WriteLine(); Genre a = new Genre(type); DALManager.InsertGenre(a); List <Genre> genres = DALManager.GetGenres(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Updated list of Genres\n"); Console.ForegroundColor = ConsoleColor.White; foreach (Genre item in genres) { Console.WriteLine(item.Type); } Console.WriteLine(); }