Example #1
0
        public IActionResult Add()
        {
            // Get the list of Users
            var listInstructors = new List <User>();

            listInstructors = context.ReadAllUsers().ToList();

            ViewBag.Instructors = listInstructors;

            return(View());
        }
Example #2
0
        /// <summary>
        /// IAction method for a view of the index
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            var vm = new HomeIndexViewModel
            {
                Users = context.ReadAllUsers().ToList()
            };

            return(View(vm));
        }
Example #3
0
        /// <summary>
        /// IAction method for returning an index view
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            var model = context.ReadAllUsers();

            return(View(model));
        }