From 468824c7868ca15326ab7a536c4f55e22002b953 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Sat, 2 Mar 2024 22:09:24 +0100 Subject: [PATCH] =?UTF-8?q?ReadOnly-Propery=20IsAlcoholic=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CocktailWeb/Data/Cocktail.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CocktailWeb/Data/Cocktail.cs b/CocktailWeb/Data/Cocktail.cs index bf014f1..02dc7bb 100644 --- a/CocktailWeb/Data/Cocktail.cs +++ b/CocktailWeb/Data/Cocktail.cs @@ -9,7 +9,13 @@ public string? ImageURL { get; set; } - public int Counter { get; set; } + public int Counter { get; set; } + + public bool IsAlcoholic { get + { + return Cocktailflaschen.Any(f => f.Flasche.Alkoholisch); + } + } public List Cocktailflaschen { get; set; } = new(); }