Exemple #1
0
        public IActionResult Index(int username)
        {
            StudentStoreContext context = HttpContext.RequestServices.GetService(typeof(QuizMIS.Models.StudentStoreContext)) as StudentStoreContext;

            ViewData["Message"] = "Student";
            dynamic mymodel = new ExpandoObject();

            mymodel.Quiz    = context.GetQuizes();
            mymodel.Student = context.getStudentDetails(username);
            return(View(mymodel));
        }
Exemple #2
0
        public IActionResult Index(string username)
        {
            StudentStoreContext context = HttpContext.RequestServices.GetService(typeof(StudentMIS.Models.StudentStoreContext)) as StudentStoreContext;
            StudentData         stu     = (StudentData)context.GetStudentDetails(username);

            ViewData["name"]        = stu.name;
            ViewData["prn"]         = stu.prn;
            ViewData["department"]  = stu.department;
            ViewData["currentYear"] = stu.currentYear;
            return(View());
        }
 public StudentController(StudentStoreContext context)
 {
     studentStoreContext = context;
 }
Exemple #4
0
 public StudentRepository(StudentStoreContext db)
 {
     _db = db;
 }