/// <summary> /// Sets the collections. /// </summary> public void Loaded() { Categories = _categoryRepo.GetCategories(); AllIngredients = _ingredientRepo.GetIngredients(); ProductRecipeItems = new ObservableCollection <Data.RecipeItem>(_recipeRepo.GetRecipes() .Where(r => r.Product.ID.Equals(SelectedRecipeItem.Product.ID))); }
public IEnumerable <IngredientDto> ServiceGetIngredients() { var ingredient = _ingredientRepository.GetIngredients(); if (ingredient == null) { return(null); } return(ingredient.Select(x => x).ToList()); }
public IEnumerable <Ingredient> GetIngredient() { IEnumerable <Ingredient> ingredients = _ingredientRepo.GetIngredients(); if (ingredients != null) { _logger.LogInformation("Getting all ingredients."); return(ingredients.ToList()); } _logger.LogWarning("Attempted to get ingredients but no ingredients were available."); return(null); }
public void Loaded() { _iProductRepo.GetProducts(); _iIngredientRepo.GetIngredients(); }