// GET: Transportes/Create public ActionResult Create() { List <SelectListItem> tipos = new List <SelectListItem>(); tipos.Add(new SelectListItem() { Text = "Aire", Value = "Aire" }); tipos.Add(new SelectListItem() { Text = "Costa", Value = "Costa" }); tipos.Add(new SelectListItem() { Text = "Tierra", Value = "Tierra" }); var model = new ViewModels.ViewModelTransporte() { Transporte = new Transporte(), Destinos = DestinosController.GetDestinos(), Tipos = tipos }; return(View(model)); }
// GET: Estadias/Create public ActionResult Create() { var model = new ViewModels.ViewModelEstadia() { Estadia = new Estadia(), Destinos = DestinosController.GetDestinos() }; return(View(model)); }