public bool IsAccountContainsThisAlbum(string email, Guid albumId) { AlbumQueriesCommands AlbumCQ = new AlbumQueriesCommands(); AuthQueriesCommands AuthCQ = new AuthQueriesCommands(); var account = AuthCQ.GetAccountByEmail(email.ToLower()); if (account == null) { return(false); } var albums = AlbumCQ.GetAllAlbumsOf(account); if (albums.Count > 0) { if (albums.Any(rec => rec.Id == albumId)) { return(true); } else { return(false); } } else { return(false); } }
public List <Album> GetAllTheAlbumsOf(string email) { AuthQueriesCommands AuthCQ = new AuthQueriesCommands(); AlbumQueriesCommands AlbumCQ = new AlbumQueriesCommands(); return(AlbumCQ.GetAllAlbumsOf(AuthCQ.GetAccountByEmail(email))); }