title: Asp.net Create ActionResult parameters dictionary contains a null entry for parameter
body: <p>I have not changed my code, which used to work, I even clarified this with an earlier build of the project. However, I now get this error:</p>
  
  <p>The parameters dictionary contains a null entry for parameter 'recipeID' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Create(Int32, BareCupboard.Models.RecipeStep)' in 'BareCupboard.Controllers.RecipeStepController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
  Parameter name: parameters</p>
  
  <p>My code is:</p>
  
  <pre><code>[HttpPost]
      public ActionResult Create(int recipeID, RecipeStep newRecipeStep)
      {
          try
          {
              var recipe = db.Recipes.Single(r =&gt; r.recipeID == recipeID);
              recipe.RecipieSteps.Add(newRecipeStep);
              db.SaveChanges();
              return RedirectToAction("Index", "Recipe");
          }
          catch
          {
              return View();
          }
      }
  </code></pre>
  
  <p>I tried: int? recipeID, but this fails to work.
  Any ideas what might have happened as all I can see is mysticism at play here!</p>