Dapper.GraphQL icon indicating copy to clipboard operation
Dapper.GraphQL copied to clipboard

Support for pluralized table names

Open benmccallum opened this issue 7 years ago • 2 comments

Could we support pluralized table names for all the generic methods like Insert<T>? I see it just defaults to a table with a name the same as type T. I prefer using Users as my table names instead of User.

We could use an attribute on the T classes, like TableName("Users") that is checked before the default is used. What do you think? Or go down a fluent-style declaration in Startup.cs with some extension methods. Or support both even.

benmccallum avatar Apr 14 '18 11:04 benmccallum

I prefer fluent style, because it doesn't require you to have control over the source. In some projects, models are out of your control.

dougrday avatar Apr 14 '18 13:04 dougrday

ALmost finished a PR for this. Will submit it when I'm back again haha.

benmccallum avatar Apr 14 '18 16:04 benmccallum