I have a WebApi
to work with a database of Firebird 2.5
, I used at the time the EF, but today it is presenting me with 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 is a limitation in naming fields Colunas
, Tabelas
, Indices
, etc in firebird, and because it is a base of a legacy system it does not have the correct mappings of the entities, in base it will hardly have FK , for some reason EF is automatically generating the FK name by popping the character limit, I wonder if there is any way to set the ForeignKey name 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 give a name to the index
[Index("IX_IMP_DET_IMP_ID")]
However for FK the DataAnnotations is not possible