Exemple #1
0
 public static SchoolYearClassesViewData Create(SchoolYear schoolYear, IList <Class> classes, School school)
 {
     return(new SchoolYearClassesViewData
     {
         SchoolYear = SchoolYearViewData.Create(schoolYear),
         Classes = classes.Select(ShortClassViewData.Create).ToList(),
         SchoolId = school.Id,
         SchoolName = school.Name
     });
 }
Exemple #2
0
        public static SchoolYearViewData Create(SchoolYear schoolYear)
        {
            var res = new SchoolYearViewData
            {
                Id          = schoolYear.Id,
                Name        = schoolYear.Name,
                Description = schoolYear.Description,
                StartDate   = schoolYear.StartDate,
                EndDate     = schoolYear.EndDate,
                SchoolId    = schoolYear.SchoolRef
            };

            return(res);
        }