Exemplo n.º 1
0
        public GroupCoursesViewModel(
            int groupId,
            string groupName,
            PaginationResult <GroupCourse> result
            ) : base(result)
        {
            GroupId   = groupId;
            GroupName = groupName;
            var routeData = new Dictionary <string, string> {
                { "groupId", groupId.ToString() }
            };

            TabsNavLinks = new TabsNavViewModel(DelegateGroupTab.Courses, routeData);
            GroupCourses = result.ItemsToDisplay.Select(
                groupCourse => new GroupCourseViewModel(
                    groupCourse,
                    result.GetReturnPageQuery($"{groupCourse.GroupCustomisationId}-card")
                    )
                );
        }