✅ Foreign key not working
Hi, I tried making a foreign key in my table, to another table which I made but it does not work as intended.
I tried making a filename field which is a fk to a textfilemodel, but it has instead made two separate fields:
11 Replies
because by convention your nav prop should be the same as the FK
So it has to be TextFileModel?
is
FileName
the FK for TextFileModel
?Yeah
I tried this and it seems to have worked
Alright
I have another question, in my textfilemodel I have two foreign keys to the asp.net user table, and for some reason they allow nulls
even though I did not specify for them to
and thats the code
because strings are nullable by default
[Required]
Alright, thanks!
Closed!