public ActionResult AddStudentCourse(int idStudent , int idCourse) { datosAsocia a = new datosAsocia(); a.course_id = idCourse; a.student_id = idStudent; db.AddStudentCourse(a); db.SaveChanges(); return RedirectToAction("Asociaciones", new { id = idCourse}); }
public void AddStudentCourse(datosAsocia a) { new Enlace().EjecutarAccion("http://localhost:3000/course_students.json", "POST", a); //var json = new Enlace().EjecutarAccion("http://localhost:3000/course_students.json?course_id="+idCourse+"&student_id="+idstudent, "POST"); //return new JavaScriptSerializer().Deserialize<List<Course>>(json); }