BakaPresident
BakaPresident
Explore posts from servers
CC#
Created by BakaPresident on 6/19/2023 in #help
❔ Entity Framework not required foreign key as required?
Okay thanks! i'll stick with [Required] just weird that null!; works on Genre but not User
6 replies
CC#
Created by BakaPresident on 6/19/2023 in #help
❔ Entity Framework not required foreign key as required?
To clarify, the database is indeed linked with foreign key constraint. However, what puzzles me is why UserId in the table is placed as nullable, however, Genre is not nullable. I wanted both to be non nullable but it doesn't seem to work in my way that i intended? I could force it to be [Required] which should fulfil my requirement but is that okay?
6 replies