@model KernelRecordsMVC.Models.Release @{ ViewData["Title"] = Model.Title; var isAlbum = Model.Album != null; var isSingle = Model.SingleRelease != null; var releaseType = isAlbum ? "ALBUM" : isSingle ? "SINGLE" : "RELEASE"; var artists = string.Join( ", ", Model.ReleaseArtists .OrderBy(x => x.ReleaseOrdinal) .Select(x => x.Artist.ArtistName) ); }
@if (!string.IsNullOrWhiteSpace(Model.CoverPhoto)) { @Model.Title } else {
♪
}
@releaseType

@Model.Title

@artists

Genre @Model.Genre
Released @Model.ReleaseDate.ToString("MMM dd, yyyy")
Label @Model.RecordLabel
@foreach (var artist in Model.ReleaseArtists .OrderBy(x => x.ReleaseOrdinal)) { @artist.Artist.ArtistName @if (artist.Type.ToString() == "FEATURE") { Featured } }

Choose your format

@Model.Products.Count product(s)
@if (!Model.Products.Any()) {
No physical products are currently available.
} else {
@foreach (var product in Model.Products .OrderBy(x => x.Format)) {
@product.Format @if (product.Stock > 0) { In stock } else { Out of stock }
@product.Price.ToString("C")

@product.ProductDescription

@if (product.Stock > 0) { } else { }
}
}
@if (Model.Album != null) {

Track List

@Model.Album.AlbumSongs.Count tracks
    @{ var trackNumber = 1; } @foreach (var albumSong in Model.Album.AlbumSongs .OrderBy(x => x.SongId)) {
  1. @trackNumber.ToString("00")
    @albumSong.Song.SongName @if (albumSong.Song.SongArtists.Any()) {
    @string.Join( ", ", albumSong.Song.SongArtists .OrderBy(x => x.SongOrdinal) .Select(x => x.Artist.ArtistName) )
    }
    @albumSong.Song.SongDuration
  2. trackNumber++; }
} @if (Model.SingleRelease != null) {

Single Information

Single

Duration @Model.SingleRelease.Duration
}