Esempio n. 1
0
        public async Task <IActionResult> GetFaculty()
        {
            var allFaculty = await _facultyRepository.GetAllFaculty();

            var sortedFaculty    = allFaculty.OrderBy(f => f.username);
            var facultyViewModel = new FacultyViewModel()
            {
                Faculty = sortedFaculty.ToList(),
                Title   = "Our Faculty"
            };

            return(View(facultyViewModel));
        }
Esempio n. 2
0
        // The data obtained from the GetAllFaculty is sorted further and passed into view model
        public async Task <IActionResult> GetFaculty()
        {
            var allFaculty = await _facultyRepository.GetAllFaculty();

            var sortedFaculty    = allFaculty.OrderBy(f => f.username);
            var facultyViewModel = new FacultyViewModel()
            {
                Faculty  = allFaculty.ToList(),
                Title    = "School of Information Faculty Members",
                Subtitle = "To view more about our faculty and staff, click below."
            };

            return(View(facultyViewModel));
        }
        public async Task <IActionResult> GetFaculty()
        {
            var allFaculty = await _facultyRepository.GetAllFaculty();

            var sortedFaculty = allFaculty.OrderBy(f => f.username);

/*            //var allResearch = await _researchRepository.GetAllResearch();
 *         var sortedResearch = allResearch.OrderBy(f => f.username);*/

            var facultyViewModel = new FacultyViewModel()
            {
                Faculty = sortedFaculty.ToList(),
                Title   = "Meet your Faculty",

/*               Research = allResearch.ToList(),
 */
            };

            return(View(facultyViewModel));
        }
Esempio n. 4
0
        public async Task <IActionResult> GetFaculty()
        {
            var allFaculty = await _facultyRepository.GetAllFaculty();

            var sortedFaculty = allFaculty.OrderBy(f => f.username);
            var allStaff      = await _staffRepository.GetAllStaff();

            var sortedStaff   = allStaff.OrderBy(f => f.username);
            var homeViewModel = new HomeViewModel();

            homeViewModel.Faculty = allFaculty.ToList();
            homeViewModel.Staff   = allStaff.ToList();

            /*{
             *  Faculty = allFaculty.ToList(),
             *  Staff = allStaff.ToList(),
             *  Title = "This is your Faculty"
             * };*/
            return(View(homeViewModel));
        }
Esempio n. 5
0
        public async Task <IActionResult> Faculty()
        {
            var singleFooter = new GetFooter();
            var footer       = await singleFooter.GetSimpleFooter();

            var allFaculty = await _facultyRepository.GetAllFaculty();

            var sortedFaculty = allFaculty.OrderBy(f => f.username);
            var getResearch   = new GetResearchByFaculty();
            var research      = await getResearch.GetAllResearchByFaculty();

            var facultyViewModel = new FacultyViewModel()
            {
                FooterInfo        = footer,
                ResearchByFaculty = research,
                Faculty           = allFaculty.ToList(),
                Title             = "Our Staff"
            };

            return(View(facultyViewModel));
        }