public ActionResult Form(int?id, Operacion operacion) { var customer = new Customer(); if (id.HasValue) { customer = servicioCustomer.obtenerPorID(id.Value); } ViewData["Operacion"] = operacion; return(View(customer)); }
public ActionResult Form(int?Id /*puede aceptar nulos*/, Operacion operacion) { var customer = new Customer(); //SI EL Id TIENE UN VALOR, ENTONCES SE PROCEDE A BUSCAR UNA CARRERA if (Id.HasValue) { customer = servicio.obtenerPorID(Id.Value); } //INDICA LA OPERACION QUE ESTAMOS REALIZANDO EN EL FORMULARIO ViewData["Operacion"] = operacion; return(View(customer)); }