0
Tested having problem with relation between Department and Employee tables
This returns 2 error: -"Entitytype 'Funcionario' has no key defined. Define the key for this Entitytype." -Employees' is based on type 'Employee' that has no Keys defined. And if I put [Key] in both continue the same thing, with msg "Failure in ALTER TABLE ALTER COLUMN because the 'Funcionnarioid' column does not exist in the 'Funcionario' table." She does have the Funcionnarioid field,
Department:
public int DepartamentoID { get; set; }
public string DEPARTAMENTO_NOME { get; set; }
public string DEPARTAMENTO_SALA { get; set; }
public string ANDAR { get; set; }
Functionary:
public int FuncionnarioID { get; set; }
public string FUNCIONARIO_EMAIL { get; set; }
public string FUNCIONARIO_NOME { get; set; }
public string FUNCIONARIO_CIDADE { get; set; }
public string FUNCIONARIO_ENDERECO { get; set; }
public int DepartamentoID { get; set; }
[ ForeignKey("DepartamentoID")]
public virtual Departamento Departamento { get; set; }