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

前端 未结 5 640
慢半拍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:56

        protected override void OnModelCreating(System.Data.Entity.DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove();
        }
    

提交回复
热议问题