public MainForm(Query queryManager)
        {
            InitializeComponent();

            _searchResultsForm = new SearchResultsForm(queryManager);
            _artistForm        = new ArtistForm(queryManager);
            _albumForm         = new AlbumForm(queryManager);
            _concertForm       = new ConcertForm(queryManager);
            _playlistForm      = new PlaylistForm(queryManager);
        }
 private bool LoginSuccess(string email, string password)
 {
     using (MusicAppContext ctx = new MusicAppContext())
     {
         var currentUser = ctx.Users.FirstOrDefault(u => (u.Email.Trim() == email) && (u.Password.Trim() == password));
         if (currentUser != null)
         {
             this.Hide();
             PlaylistForm newPlaylistForm = new PlaylistForm(currentUser.UserId);
             MessageBox.Show("logged in successfull");
             newPlaylistForm.Show();
             return(true);
         }
     }
     MessageBox.Show("connection to database failed or user not found");
     return(false);
 }