Exemple #1
0
 public static Recipe FromDomainRecipe(Domain.Recipes.Entities.Recipe recipe) =>
 new Recipe(recipe.Id.Value,
            recipe.Name,
            recipe.Description,
            recipe.ImageUrl,
            RecipeInfo.FromDomainRecipeInfo(recipe.RecipeInfo),
            GetRecipeIngredients(recipe));
Exemple #2
0
 public Recipe(Guid id,
               string name,
               string description,
               string imageUrl,
               RecipeInfo recipeInfo,
               ICollection <RecipeIngredient> recipeIngredients)
 {
     Id                = id;
     Name              = name;
     Description       = description;
     ImageUrl          = imageUrl;
     RecipeInfo        = recipeInfo;
     RecipeIngredients = recipeIngredients;
 }