Link to home
Create AccountLog in
Avatar of AmbassadorSpock
AmbassadorSpockFlag for United States of America

asked on

[ForeignKey] not working in System.ComponentModel.DataAnnotations

I am using System.ComponentModel.DataAnnotations in MVC 4 and I am able to specify [Key] for the primary key but [ForeignKey] does not come up in the intellisense nor can I just type in [ForeignKey] without getting an error. Nothing that I have found yet directs me to a possible solution.

Can anyone help?
Avatar of Stephan
Flag of Netherlands image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account