public ActionResult AddIngredient(FormCollection collection) { var toPage = collection["To"].ToString(); if (service.AddIngredientToMember(Int32.Parse(collection["Id"]), new IngredientViewModel { Amount = Double.Parse(collection["Amount"]), IngredientName = collection["IngredientName"], MeasurementType = collection["MeasurementName"] })) { if (toPage == "Save") { } else { return(RedirectToAction("AddIngredient", new { id = collection["Id"] })); } } return(RedirectToAction("Index")); }