//--------------------------------------------------------------------- public IActionResult UpdateCourse([FromBody] Course course) { // Major major2 = new Major(); courseDAO = new CourseDAO(_configuration); //major2.Id = student.Major_Id; //student.Major = major2; return(Ok(courseDAO.UpdateCourse(course))); }
public JsonResult UpdateCourse(Course course) { if (course == null) { return(Json(new { Message = "Error", HasError = true })); } var dao = new CourseDAO(); var message = dao.UpdateCourse(course); return(Json(new { Message = message, HasError = false })); }