public static ClassroomGroup CreateClassroomGroup(string dataAreaId, string classroomGroupId) { ClassroomGroup classroomGroup = new ClassroomGroup(); classroomGroup.dataAreaId = dataAreaId; classroomGroup.ClassroomGroupId = classroomGroupId; return(classroomGroup); }
protected ClassroomGroupView ConvertToViewModel(ClassroomGroup entity) => new ClassroomGroupView { ClassroomGroupId = entity.Id, ClassroomGroupSeq = entity.Seq, ClassroomGroupName = entity.Name, ClassroomGroupImage = entity.Image, Classrooms = entity.Classrooms.OrderBy(x => x.Seq).Select(c => new ClassroomView { ClassroomId = c.Id, ClassroomName = c.Name, ClassroomSeq = c.Seq, IsAcOn = c.IsAcOn, IsAuto = c.IsAuto, ModifiedOn = c.ModifiedOn }) };