Example #1
0
        //Get: Class/Show/{id}
        public ActionResult Show(int id)
        {
            //Instantiating the ClassDataController
            ClassDataController Controller = new ClassDataController();
            //Access FindClass(int id)Method
            Class Class = Controller.FindClass(id);

            return(View(Class));
        }
Example #2
0
        // GET: Class/List
        // Or GET: Class/List?Searchkey= {SearchKey}
        public ActionResult List(string Searchkey = null)
        {
            //Instantiating the ClassDataController
            ClassDataController Controller = new ClassDataController();
            //Access ListClasses() method
            List <Class> Class = Controller.ListClasses(Searchkey);

            return(View(Class));
        }