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 }); }
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); }