public ActionResult newPlato(PlatoView platoView) { var list = Dd.Customers.ToList(); list.Add(new Customer { CustomerId = 0, FirstName = "[Seleccione un Cliente]" }); list = list.OrderBy(C => C.FullName).ToList(); ViewBag.CustomerId = new SelectList(list, "CustomerId", "FullName"); return(View(platoView)); }
// GET: del custumer public ActionResult NewPlato() { var platoView = new PlatoView(); platoView.Customer = new Customer(); platoView.foods = new List <FoodPlato>(); Session["platoView"] = platoView; var list = Dd.Customers.ToList(); list.Add(new Customer { CustomerId = 0, FirstName = "[Seleccione un Cliente]" }); list = list.OrderBy(C => C.FullName).ToList(); ViewBag.CustomerId = new SelectList(list, "CustomerId", "FullName"); return(View(platoView)); }