public static Room Create(IGraphSchedule schedule) { // build up the room with validation and addtl fields return(new Room { RoomName = GetRoomName(schedule.scheduleId), RoomId = schedule.scheduleId, Schedule = RoomSchedule.Create(schedule) }); }
public static IRoomSchedule Create(IGraphSchedule sched) { var roomSched = new RoomSchedule { ScheduleItems = new List <IRoomScheduleItem>() }; roomSched.ScheduleItems = sched.scheduleItems.Select(RoomScheduleItem.Create).ToList(); return(roomSched); }