public ActionResult Edit([Bind(Include = "IngredientId,Name,Description,AlcoholPercent,MeasurementUnitId,ImageURL")] INGREDIENT iNGREDIENT) { if (ModelState.IsValid) { INGREDIENT currentIngredient = db.INGREDIENT.Find(iNGREDIENT.IngredientId); currentIngredient = ControllerHelpers.UpdateEntity(currentIngredient, iNGREDIENT, ModelState.Keys.ToList()); currentIngredient.ModifiedBy = User.Identity.GetUserId(); currentIngredient.DateModified = DateTime.Now; db.Entry(currentIngredient).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ModifiedBy = UserHelpers.GetCurrentUserId(); ViewBag.MeasurementUnitId = new SelectList(db.MEASUREMENT_UNIT, "MeasurementUnitId", "ShortName", iNGREDIENT.MeasurementUnitId); return(View(iNGREDIENT)); }