@model SceneEditViewModel @{ var primaryLocation = Model.LocationOptions.FirstOrDefault(x => x.Value == Model.PrimaryLocationID?.ToString())?.Text?.Trim(); var locationNames = new[] { primaryLocation }.Where(x => !string.IsNullOrWhiteSpace(x)) .Select(x => x!) .Concat(Model.SceneCharacters.Where(x => !string.IsNullOrWhiteSpace(x.LocationName)).Select(x => x.LocationName!)) .Concat(Model.SceneAssetLocations.Where(x => !string.IsNullOrWhiteSpace(x.LocationName)).Select(x => x.LocationName!)) .Distinct(StringComparer.OrdinalIgnoreCase) .ToList(); var assetNames = Model.AssetEvents.Select(x => x.AssetName).Where(x => !string.IsNullOrWhiteSpace(x)).Distinct(StringComparer.OrdinalIgnoreCase).ToList(); }

World

Locations and assets

Locations @if (!locationNames.Any()) {

No scene locations have been assigned yet.

} else {
@foreach (var location in locationNames.Take(8)) { @location }
}
Assets @if (!assetNames.Any()) {

No story assets appear in this scene yet.

} else { }
@if (Model.AssetEvents.Any() || Model.AssetCustodyEvents.Any() || Model.SceneAssetLocations.Any()) {

@Model.AssetEvents.Count asset event@(Model.AssetEvents.Count == 1 ? "" : "s"), @Model.AssetCustodyEvents.Count custody entr@(Model.AssetCustodyEvents.Count == 1 ? "y" : "ies"), @Model.SceneAssetLocations.Count placed asset@(Model.SceneAssetLocations.Count == 1 ? "" : "s").

}