public static ClassSummaryViewData Create(ClassDetails classDetails, Room currentRoom) { return(new ClassSummaryViewData(classDetails) { Room = RoomViewData.Create(currentRoom) }); }
public static ClassSummaryViewData Create(ClassDetails classDetails, Room currentRoom, IList <Period> periods, IList <DayType> dayTypes) { return(new ClassSummaryViewData(classDetails) { Room = currentRoom != null?RoomViewData.Create(currentRoom) : null, Periods = periods?.Select(x => x.Name).ToList(), DayTypes = dayTypes?.Select(x => x.Name).ToList() }); }
protected ClassInfoViewData(ClassDetails cClass, Room room, ChalkableDepartment department) : base(cClass) { if (room != null) { Room = RoomViewData.Create(room); } if (department != null) { Department = ChalkableDepartmentViewData.Create(department); } }