[#61] Windows: Use red and green color to indicate type of WineVariety
All checks were successful
Test / Run tests (push) Successful in 2m17s
All checks were successful
Test / Run tests (push) Successful in 2m17s
This commit is contained in:
@ -4,6 +4,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Windows.Media;
|
||||
using IndexAttribute = Microsoft.EntityFrameworkCore.IndexAttribute;
|
||||
|
||||
namespace Elwig.Models.Entities {
|
||||
@ -118,6 +119,9 @@ namespace Elwig.Models.Entities {
|
||||
public string SortIdString => string.Join(", ", SortIds);
|
||||
public string FilteredSortIdString => string.Join(", ", FilteredSortIds);
|
||||
|
||||
public Brush? Color => Parts.Select(p => p.Variety.Color).Distinct().SingleOrDefault();
|
||||
public Brush? FilteredColor => FilteredParts.Select(p => p.Variety.Color).Distinct().SingleOrDefault();
|
||||
|
||||
public IEnumerable<string> Modifiers => Parts
|
||||
.SelectMany(p => p.Modifiers)
|
||||
.Select(m => m.Name)
|
||||
|
Reference in New Issue
Block a user