@@ -35,6 +35,7 @@ public class UserDTO
3535 public Specialism ? Specialism { get ; set ; }
3636
3737 public int ? CohortId { get ; set ; }
38+ public int ? CohortCourseId { get ; set ; }
3839
3940 public DateTime ? CurrentStartdate { get ; set ; }
4041 public DateTime ? CurrentEnddate { get ; set ; }
@@ -63,7 +64,8 @@ public UserDTO(User model)
6364 Mobile = model . Mobile ;
6465 Specialism = model . Specialism ;
6566 Role = model . Role . ToString ( ) ;
66- CohortId = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . CohortId ; //autofetching the first element of usercc
67+ CohortId = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . CohortId ;
68+ CohortCourseId = model . User_CC ? . LastOrDefault ( ) ? . Id ; //autofetching the first element of usercc
6769 CurrentStartdate = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . Cohort . StartDate ; //autofetching the first element of usercc
6870 CurrentEnddate = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . Cohort . EndDate ; //autofetching the first element of usercc
6971 Notes = model . Notes . Select ( n => new NoteDTO ( n ) ) . ToList ( ) ;
@@ -81,7 +83,8 @@ public UserDTO(User model, PrivilegeLevel privilegeLevel)
8183 Mobile = model . Mobile ;
8284 Specialism = model . Specialism ;
8385 Role = model . Role . ToString ( ) ;
84- CohortId = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . CohortId ; //autofetching the first element of usercc
86+ CohortId = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . CohortId ;
87+ CohortCourseId = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . CohortId ; //autofetching the first element of usercc
8588 CurrentStartdate = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . Cohort . StartDate ; //autofetching the first element of usercc
8689 CurrentEnddate = model . User_CC ? . LastOrDefault ( ) ? . CohortCourse . Cohort . EndDate ; //autofetching the first element of usercc
8790
0 commit comments