public void Update(string name, string description, RecipeInfo info, IEnumerable <RecipeIngredient> ingredients) { Name = SetName(name); Description = SetDescription(description); RecipeInfo = info; RecipeIngredients = new RecipeIngredientsCollection(ingredients); Update(); }
private Recipe(Identity <Guid> id, string name, string description, string imageUrl, RecipeInfo recipeInfo, IEnumerable <RecipeIngredient> recipeIngredients, IEventPublisher eventPublisher, IRecipeRepository recipeRepository) { Id = id; Name = SetName(name); Description = SetDescription(description); ImageUrl = imageUrl; RecipeInfo = recipeInfo; RecipeIngredients = new RecipeIngredientsCollection(recipeIngredients); _eventPublisher = eventPublisher; _recipeRepository = recipeRepository; }