3
Answers

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

Photo of Mark Tabor

Mark Tabor

5y
838
1
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)