Ejemplo n.º 1
0
        private async Task CreateIngredients()
        {
            int ingredientsCount = await _ingredientRepository.Count();

            if (ingredientsCount == 0)
            {
                await _ingredientRepository.Add(new Ingredient()
                {
                    Title        = "vodka",
                    MeasurmentId = 1
                });

                await _ingredientRepository.Add(new Ingredient()
                {
                    Title        = "tonic",
                    MeasurmentId = 2
                });

                await _ingredientRepository.Add(new Ingredient()
                {
                    Title        = "juice",
                    MeasurmentId = 3
                });
            }
        }