Mark Tabor

Mark Tabor

  • 587
  • 2k
  • 460.6k

How to map the foreign key in my model class using MVC

Nov 21 2019 12:39 PM
I have two tables like below 
 Table_ID Course_Category_ID Course_Category_NAme
 1       1    Basic Sciences
 
and The Course Main Table in which this category ID would be a foreign key  
 Table_ID    Course_Category_ID(F) Course_ID Course_Name
    1 1 1 Math
 2 1 2 Physics
 
how to write a model class where course category_ID is foreign key 

Answers (3)