Hi,
I´m writing a Entity Framwork application using C#. Everything runs fine until I add a foreign key to my model.
Here´s a single example of a table that I´m mapping:
[Table("DCDC", Schema = "MZMESDB")]
public class EfDcDc
{
/// <summary>
/// Element ID
/// </summary>
[Column("ID")]
public int Id { get; set; }
/// <summary>
/// Name of DC
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// DC Description
/// </summary>
[Column("DESCRIPTION")]
public string Description { get; set; }
public virtual EfSystemDataModule Module { get; set; } <------------ This is the origin of my problem
/// <summary>
/// Name of module
/// </summary>
[Column("ENABLED")]
public string Enabled { get; set; }
}
If I ommit the public virtual EfSystemDataModule Module line, everything works fine, I can connect to database and make transactions. If I add that line (that´s actually my Foreign Key), EF adds a "Module_Id" (exactly like that with mixed case) reference on the EF SQL Script and every transaction with this object on dbcontext returns an error (ORA-00904: "Extent1"."Module_Id": invalid identifier)..
I could find no reference of where this Module_Id is coming from and I need help, as my development is stuck on that.
Thanks in advance for any hint or help.
Rds