public IActionResult EditCourse(string id, CourseModel model) { if (id != model.CourseId) { return(NotFound()); } if (ModelState.IsValid) { _courseservices.EditCourse(id, model); return(RedirectToAction("Index")); } return(View(model)); }