1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
public class User 
{
   public int UserId
   public List<Registration> Registrations { get;set; } 

  public void AddRegistration(Registration registratraion) 
   { 
      _registrations.Add(registration); 
   }

}

public class Registration 
{  
   UserId 
   CourseId 
   DateCreated 
}

public class Course 
{
  CourseId 
  Title 
}

RegistrationRepository.Save(user) // user has a list of registrations which has courseId and will be save.