private void OnIngredientRemoving(IngredientRemoving message)
        {
            var ingredient = Ingredients.FirstOrDefault(x => x.Id == message.Id);

            if (ingredient == null)
            {
                return;
            }
            Ingredients.Remove(ingredient);
            UpdatePositions(Ingredients);
        }
Beispiel #2
0
        private void Delete()
        {
            var message = new IngredientRemoving(this, Id);

            _messenger.Publish(message);
        }