diff --git a/backend/API/BusinessLogic/RecipeLogic.cs b/backend/API/BusinessLogic/RecipeLogic.cs index fb101f0..687c22f 100644 --- a/backend/API/BusinessLogic/RecipeLogic.cs +++ b/backend/API/BusinessLogic/RecipeLogic.cs @@ -52,7 +52,7 @@ namespace API.BusinessLogic { Ingredient ingredient = new Ingredient(); ingredient.Unit = item.Unit; - ingredient.Element = item.Element; + ingredient.Name = item.Name; ingredient.Amount = item.Amount; recipe1.Ingredients.Add(ingredient); } @@ -80,7 +80,7 @@ namespace API.BusinessLogic { Ingredient ingredient = new Ingredient(); ingredient.Unit = item.Unit; - ingredient.Element = item.Element; + ingredient.Name = item.Name; ingredient.Amount = item.Amount; dish.Ingredients.Add(ingredient); } diff --git a/backend/API/BusinessLogic/ShoppingListLogic.cs b/backend/API/BusinessLogic/ShoppingListLogic.cs index 87c4165..53f2da9 100644 --- a/backend/API/BusinessLogic/ShoppingListLogic.cs +++ b/backend/API/BusinessLogic/ShoppingListLogic.cs @@ -146,9 +146,9 @@ namespace API.BusinessLogic { List shoppingList = user.ShoppingList; - if (shoppingList.Any(s => s.Name == ingredient.Element)) + if (shoppingList.Any(s => s.Name == ingredient.Name)) { - ShoppingList item = shoppingList.Where(s => s.Name == ingredient.Element).FirstOrDefault(); + ShoppingList item = shoppingList.Where(s => s.Name == ingredient.Name).FirstOrDefault(); shoppingList.Remove(item); if (item.Unit == ingredient.Unit) @@ -194,7 +194,7 @@ namespace API.BusinessLogic else { ShoppingList newItem = new ShoppingList(); - newItem.Name = ingredient.Element; + newItem.Name = ingredient.Name; newItem.Amount = ingredient.Amount; newItem.Unit = ingredient.Unit; newItem.Checked = false; diff --git a/backend/API/Models/RecipeModels/Ingredient.cs b/backend/API/Models/RecipeModels/Ingredient.cs index f2af7ee..cd9cb96 100644 --- a/backend/API/Models/RecipeModels/Ingredient.cs +++ b/backend/API/Models/RecipeModels/Ingredient.cs @@ -8,6 +8,6 @@ public string Unit { get; set; } - public string Element { get; set; } + public string Name { get; set; } } } diff --git a/backend/API/Models/RecipeModels/IngredientDTO.cs b/backend/API/Models/RecipeModels/IngredientDTO.cs index b85d789..22de909 100644 --- a/backend/API/Models/RecipeModels/IngredientDTO.cs +++ b/backend/API/Models/RecipeModels/IngredientDTO.cs @@ -6,6 +6,6 @@ public string Unit { get; set; } - public string Element { get; set; } + public string Name { get; set; } } }