// GET: Contact/Create public ActionResult Create() { SelectList sexes = new SelectList(Sexes.Get()); ViewBag.Sexes = sexes; return(View()); }
// GET: Contact/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(HttpNotFound()); } Models.Contact contact = _db.Get(id); if (contact == null) { return(HttpNotFound()); } SelectList sexes = new SelectList(Sexes.Get()); ViewBag.Sexes = sexes; return(View(contact)); }