Reputation: 5544
After move my Project vs2010 ef 4 to vs 2012 ef5 , appear on my Project some problems with DataAnnotations on the models
[ForeignKey("StrIdDocumento")]
Can't find type or space name 'ForeignKey' [Lost using directive or assembly reference]
I remove the reference to EF 4, then add EF5 using nugget. But the problem persists
Note: My Project is an MVC with c# and ASP.
Upvotes: 0
Views: 41
Reputation: 749
Likely missing this using statement.
using System.ComponentModel.DataAnnotations.Schema;
you may want to look into using the fluent api also instead of data annotations, just a thought.
Upvotes: 1