// GET: IngredientsPerRecipes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            IngredientsPerRecipe ingredientsPerRecipe = db.IngredientsPerRecipies.Find(id);

            if (ingredientsPerRecipe == null)
            {
                return(HttpNotFound());
            }
            return(View(ingredientsPerRecipe));
        }
        // GET: IngredientsPerRecipes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            IngredientsPerRecipe ingredientsPerRecipe = db.IngredientsPerRecipies.Find(id);

            if (ingredientsPerRecipe == null)
            {
                return(HttpNotFound());
            }
            ViewBag.IngredientId = new SelectList(db.Ingredients, "Id", "Name", ingredientsPerRecipe.IngredientId);
            ViewBag.MetricId     = new SelectList(db.Metrics, "Id", "Name", ingredientsPerRecipe.MetricId);
            ViewBag.RecipeId     = new SelectList(db.Recipes, "Id", "Name", ingredientsPerRecipe.RecipeId);
            return(View(ingredientsPerRecipe));
        }