public CourseTracker AddTracker(CourseTracker tracker)
        {
            tracker.IsCompleted = false;

            if (_context.CourseTrackers.FirstOrDefault(ct => ct.CourseID == tracker.CourseID && tracker.ApplicationUserId == tracker.ApplicationUserId) == null)
            {
                var addedTracker = _context.Add(tracker);
                _context.SaveChanges();
                return tracker;
            }

            return null;
        }
        public CourseTracker UpdateCourseTracker(CourseTracker updatedTracker)
        {
            var tracker = _context.CourseTrackers.FirstOrDefault(ct => ct.CourseTrackerID == updatedTracker.CourseTrackerID);

            if (tracker != null)
            {
                tracker.IsCompleted = updatedTracker.IsCompleted;

                _context.Entry(tracker).State = Microsoft.Data.Entity.EntityState.Modified;

                _context.SaveChanges();
                return tracker;
            }

            return null;
        }