Entity Framework - CTP4 - Code First - How to turn off the automatic pluralization?

前端 未结 5 733
慢半拍i
慢半拍i 2021-01-01 00:20

My entity name is \"Contact\" and my table name is \"Contact\". However, the default pluralization support is making EF4 to look for a table named \"Contacts\". Anybody has

5条回答
  •  无人及你
    2021-01-01 00:44

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove();
            base.OnModelCreating(modelBuilder);
        }
    

提交回复
热议问题