public AlbumModel Reload() { try { if (ID <= 0) { throw new Exception("Error, incorect album ID"); } SourceManagerLoad.Load(this); return(this); } catch (Exception e) { return(this); } }
public bool Reload() { try { if (ID <= 0) { throw new Exception("Error, incorect album ID"); } SourceManagerLoad.Load(this); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine($"Odczytano z bazy danych album o ID: {ID}"); Console.ResetColor(); return(true); } catch (Exception e) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(e.Message); Console.ResetColor(); return(false); } }