Пример #1
0
        /*
         * Responsible for creating the Coop page when loaded in
         * This data includes information on coop data that is provided by the API
         */
        public async Task <IActionResult> Coop()
        {
            var getCoop = new GetCoop();
            var coop    = await getCoop.getAllCoops();

            var coopViewModel = new CoopViewModel()
            {
                coopInformation = coop,
                Title           = "Recent Co-op Information"
            };

            return(View(coopViewModel));
        }
Пример #2
0
        public async Task <IActionResult> Coop()
        {
            //populate it with the api call to coop table and need to build the view and model
            var getallcoop = new GetCoopInfo();
            var grads      = await getallcoop.CoopInfo();

            var sortedCoop    = grads.OrderBy(f => f.term);
            var coopViewModel = new CoopViewModel()
            {
                Coop  = sortedCoop.ToList(),
                Title = "Students Co-op"
            };

            return(View(coopViewModel));
        }