MVC 移除复数表名的契约

在数据库上下文中添加:

using System.Data.Entity.ModelConfiguration.Conventions;
  protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();//移除复数表名的契约
        }

  

  

原文地址:https://www.cnblogs.com/yechangzhong-826217795/p/5564495.html