Estoy utilizando Entity Framework 4.3 code-first con Oracle. Estoy consiguiendo el error siguiente:Asignación de una clave externa con un nombre de columna personalizado
System.InvalidOperationException : The ForeignKeyAttribute on property 'WidgetSequence' on type 'WidgetDistributor.WidgetEntity' is not valid. The foreign key name 'WIDGETSEQUENCE_ID' was not found on the dependent type 'WidgetDistributor.WidgetEntity'. The Name value should be a comma separated list of foreign key property names.
Mis entidades son así:
[Table("WIDGETENTITIES")]
public class WidgetEntity {
[Column("WIDGETENTITY_ID")]
public int Id { get; set; }
[ForeignKey("WIDGETSEQUENCE_ID")]
public WidgetSequence Sequence { get; set; }
// and other properties that map correctly
}
[Table("WIDGETSEQUENCES")]
public class WidgetSequence {
[Column("WIDGETSEQUENCE_ID")]
public int Id { get; set; }
[Column("NUMBER")]
public int Number { get; set; }
}
Mi código parece correcto. ¿Qué he hecho mal aquí?
Gracias por la respuesta. ¿Qué pasa con este problema? ¿Podría echar un vistazo a por favor? Gracias de antemano ... http://stackoverflow.com/questions/29333787/how-to-create-lookup-table-and-define-relationships –