Maurice Aboagye

Maurice Aboagye

  • 1.6k
  • 190
  • 155

Implement DropdownlistFor Using Code First . MVC

Oct 25 2018 7:06 AM
Hello Experts,
 
I need assistance to use Entity Framework Code First to do the following:
 
I have two tables in SQL Server 2017.
 
Table One Name is:
 
"Students"
Table One Columns are:
"StudentId",
"Student_Name" and
"Class"
 
Table Two Name is:
"Classes"
 
*** In the view I expect the <Classes> to be a dropdownlistfor so that I when Input <StudentID>, <Student_Name>, the <Classes> will be a dropdownlistfor which contains classes like (P1, P2, P3).
 
The listing for <Classes> must be retrieved from the SQL Server table please.
 
Your assistance will be very much welcomed. I need a step-by-step walkthough please.

Answers (2)