public static ShortAnnouncementGradeViewData Create(ClassAnnouncement announcement, IList <StudentAnnouncement> studentAnnouncements, int studentId, IList <ClaimInfo> claims) { return(new ShortAnnouncementGradeViewData(announcement, claims) { StudentAnnouncements = ShortStudentsAnnouncementsViewData.Create(studentAnnouncements, studentId) }); }
public static ShortAnnouncementGradeViewData Create(ClassAnnouncement announcement, IList <StudentAnnouncementDetails> studentAnnouncements, IList <int> studentIds, IList <ClaimInfo> claims) { studentAnnouncements = studentAnnouncements.Where(x => x.AnnouncementId == announcement.Id).ToList(); return(new ShortAnnouncementGradeViewData(announcement, claims) { StudentAnnouncements = ShortStudentsAnnouncementsViewData.Create(studentAnnouncements, studentIds) }); }