Is there a way how to specify a name of a foreign key constraint in Entity Framework (v6.1.3)? I mean actual name of DB constraint (like FK_Books_AuthorId
), not to specify which column is the foreign key for the given navigation property.
I know you can do it for indices, like:
Property(x => x.AuthorId).HasColumnAnnotation(IndexAnnotation.AnnotationName,
new IndexAnnotation(new IndexAttribute("IX_Books_AuthorId")));
Is anything similar possible also for foreign key constraints?