Example #1
0
 // 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);
 }
Example #2
0
 partial void SpaceRemaining_Compute(ref int result)
 {
     result = MaxEnrollment - Enrollments.Count();
 }