You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
In the Seed the database section (here) new Enrollment entities are created using hardcoded (assumed) StudentID like in the following line: new Enrollment{StudentID=1,CourseID=1050,Grade=Grade.A},
instead, the live ID can be used by just refering to the student entity by refering to its index in the array defined before: new Enrollment{StudentID=students[1].ID,CourseID=1050,Grade=Grade.A}
This method makes the solution more futureproof and opens it to a new experiments like using GUIDs instead of autogenerated IDs etc.