Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

rename join table ef core

//This is for a generated join table that isnt referenced by Data Annotations
modelBuilder.Entity<Food>()
    .HasMany(left => left.Menus)
    .WithMany(right => right.Foods)
    .UsingEntity(join => join.ToTable("TheDesiredName"));
 
PREVIOUS NEXT
Tagged: #rename #join #table #ef #core
ADD COMMENT
Topic
Name
1+4 =