public static int CompareAlbumsByName(Album x, Album y) { return StringComparer.OrdinalIgnoreCase.Compare(x.AlbumName, y.AlbumName); }
public bool InsertAlbum(string albumName, int? albumArtistId, int? releaseYear) { int? itemId = itemRepository.GenerateItemId(ItemType.Album); if (itemId == null) { return false; } Album album = new Album(); album.AlbumId = itemId; album.AlbumName = albumName; album.AlbumArtistId = albumArtistId; album.ReleaseYear = releaseYear; return this.database.InsertObject<Album>(album, InsertType.InsertOrIgnore) > 0; }