How to turn off pluralize for specific table in Entity Framework 6.0?

c# entity-framework-6

Question

You can write this code in OnModelCreating method:

modelBuilder.Conventions.Remove();

But this is applying to all tables. Is it possible to turn off to specific table by passing the table name to such method.

Thnx.

1
3
4/21/2017 5:51:37 AM

Accepted Answer

Yes

modelBuilder.Entity<Foo>().ToTable( "Whatever" );

Entity Mappings using Fluent API

8
4/21/2017 6:19:37 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow