1
I have a WebApi
to work with a Firebird 2.5
, I used the EF at the time, but today I am presenting the following error
"The name 'FK_ARRUMACAO_CHECKLIST_ARRUMACAO_ARRUMACAO_ID' is longer than Firebird’s 31 characters limit for Object Names."
I know there’s a limit to naming the camps Colunas
, Tabelas
, Indices
, etc in Firebird, and as it is a basis of a legacy system does not have the correct mapping of entities, in the base will hardly possess FK, for some reason the EF is automatically generating the name FK by exceeding the character limit, I wonder if there is any way to set the name of Foreignkey by EF either by Dataannotations or even Fluentapi?
[Table("IMPRESSAO_DETALHE")]
public class ImpressaoDetalhe
{
[Column("ID")]
public int Id { get; set; }
[Index("IX_IMP_DET_IMP_ID")]
[Column("ID_IMPRESSAO")]
public int ImpressaoId { get; set; }
[Column("LINHA")]
public string Linha { get; set; }
[Column("ORDEM")]
public int Ordem { get; set; }
public virtual Impressao Impressao { get; set; }
}
I can name the index
[Index("IX_IMP_DET_IMP_ID")]
But for FK Dataannotations is not possible