I'm just thinking about a foreign key attribute in Entity Framework (using code first approach). I want to ensure that this foreign key is always set, in other words: It should be required.
Is using the "Required"-attribute/data annotation a clean solution for this? Or should this data annotation be used for user input only?