public void DeleteCourseStudent(string CourseID, string StudentID) { Console.WriteLine("Izbrisi slusanje slusanje"); CourseStudent courseStudent = _courseStudentData.Find(StudentID, CourseID); _courseStudentData.Delete(courseStudent); }
public IActionResult Activities() { var model = _activityData.FindAll(); List <Activity> activities = model.ToList(); for (int i = 0; i < activities.Count; i++) { Activity activity = activities.ElementAt(i); CourseStudent courseStudent = _courseStudentData.Find(activity.StudentID, activity.CourseID); if (courseStudent.FinalGrade != null) { activities.Remove(activity); } } model = activities; return(View(model)); }