private void listarCarreras() { CarreraModel carreraModel = new CarreraModel(); this.cmb_carrera.DataSource = carreraModel.listarCarreras(); this.cmb_carrera.DisplayMember = "carrera"; this.cmb_carrera.ValueMember = "idCarrera"; }
public IHttpActionResult Post(CarreraModel carrera) { try { if (!ModelState.IsValid) { return(BadRequest()); } _carreraRules.Insert(_mapper.Map <Carrera>(carrera)); return(Ok(carrera)); } catch (Exception ex) { return(InternalServerError(ex)); } }