public ActionResult AjouterSelections(SelectionsRecord selection) { selection.IdBar = ((BarsTable)Session["Bar"]).bar.Id; if (ModelState.IsValid) { SelectionTable table = new SelectionTable(Session["Database"]); table.Selection = selection; table.Insert(); return RedirectToAction("AfficherSelections/" + ((BarsTable)Session["Bar"]).bar.Id.ToString()); } else { BieresTable bieres = new BieresTable(Session["Database"]); bieres.SelectAll("Brasserie, NomBiere"); selection.ListeBieres = bieres.ToList(); return View(selection); } }