Exemple #1
0
        public HttpResponseMessage DisplayTeachers()
        {
            var teacherInfo     = new TeachersRepository();
            var displayTeachers = teacherInfo.GetTeachers();

            return(Request.CreateResponse(System.Net.HttpStatusCode.OK, displayTeachers));
        }
Exemple #2
0
        // GET: Index
        public ActionResult Show()
        {
            var classes  = DB.GetClasses();
            var teachers = TeachersRepository.GetTeachers();

            TeachersViewModel vm = new TeachersViewModel()
            {
                AllTeachers = teachers,
                AllClasses  = classes
            };

            return(View(vm));
        }