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)); }
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; }
public StudentRepository(StudentStoreContext db) { _db = db; }