コード例 #1
0
ファイル: List.cshtml.cs プロジェクト: kubkam/Elka
        public void OnGet()
        {
            switch (SearchChoice)
            {
            default:
                Courses = _courseData.GetCoursesByName(SearchTerm);
                break;

            case 1:
                Courses = _courseData.GetCoursesByMoniker(SearchTerm);
                break;

            case 2:
                Courses = _courseData.GetCoursesByEcts(SearchTerm);
                break;

            case 3:
                Courses = _courseData.GetCoursesByTeacherFirstName(SearchTerm);
                break;

            case 4:
                Courses = _courseData.GetCoursesByTeacherLastName(SearchTerm);
                break;
            }
        }