// Método para encontrar un enrollment a un Course mediante // el id del usuario public Enrollment findEnrollment(string UserId) { for (int i = 0; i < Enrollments.Count(); i++) { if (Enrollments.ElementAt(i).User.Id == UserId) { return(Enrollments.ElementAt(i)); } } return(null); }
partial void SpaceRemaining_Compute(ref int result) { result = MaxEnrollment - Enrollments.Count(); }