4
public class Lancamento {
// Colunas e métodos omitidos
[Column("IdContaBancaria")]
public virtual ContaBancaria ContaBancaria { get; set; }
}
public class ContaBancaria
{
[Key] // PK
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] // Será auto incremento
[Column("idContaBancaria"]
public int IdContaBancaria { get; set; }
public virtual ICollection<Lancamento> LancamentosCB { get; set; }
// Colunas e métodos omitidos
}
I would like to make explicit the name of fk but the name generated always [ContaBancaria_IdContaBancaria]
How to set foreign key name ?