使用ef core code first生成數(shù)據(jù)庫表,發(fā)現(xiàn)子項(xiàng)變成了復(fù)數(shù),要去掉也很簡單,加個(gè)ToTable方法限定,請(qǐng)見下面寫法。
protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<ScenicSpotInfoType>().ToTable("ScenicSpotInfoType").HasKey(c => c.ID); }
本文摘自 :https://www.cnblogs.com/