/// <summary>
 /// Initializes a new instance of the <see cref="RecipeComponent"/> class.
 /// </summary>
 public RecipeComponent(IIngredient ingredient)
 {
     _recipeComponent = new RecipeComponentDb
     {
         Ingredient = (ingredient as Ingredient).UnwrapDataObject(),
         Amount     = 0,
         Unit       = default(UnitTypes)
     };
 }
Example #2
0
 public RecipesController(IHtmlHelper htmlHelper,
                          IRecipeData recipeData,
                          IRecipeComponentData recipeComponentData,
                          IIngredientData ingredientData,
                          IUserRecipeData userRecipeData,
                          IWebHostEnvironment webHostEnvironment)
 {
     _htmlHelper          = htmlHelper;
     _recipeData          = recipeData;
     _recipeComponentData = recipeComponentData;
     _ingredientData      = ingredientData;
     _userRecipeData      = userRecipeData;
     _webHostEnvironment  = webHostEnvironment;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RecipeComponent"/> class.
 /// </summary>
 /// <param name="recipeComponent">The recipe component.</param>
 internal RecipeComponent(IRecipeComponent recipeComponent)
 {
     _recipeComponent = recipeComponent as IRecipeComponentData;
 }
 public RecipeComponentsController(IRecipeData recipeData, IRecipeComponentData recipeComponentData)
 {
     _recipeData          = recipeData;
     _recipeComponentData = recipeComponentData;
 }