Replies: 3 comments
-
Not sure I understand what you mean. A table holding a list of user details should obviously be called And yes, you can override everything you want. The details on how to do that is inside the wiki. |
Beta Was this translation helpful? Give feedback.
-
ahhh I see now, that's how you have it designed. OK that's great, thank you for the reply.
Definitely not the way it was taught to me. Entities and tables are always always singular as they are meant to describe what a single row in that table represents. It appears to be a strongly contested preference though, like the argument of whether to put the opening brace on the same line or not (I do the former myself). I think it just depends who you learned from, most of my instructors were older guys coming from C and C++ backgrounds so I suspect that's where the brace thing came from, it's probably the same thing with table naming I suspect. Lots of discussion on it with arguments both ways tho: https://stackoverflow.com/questions/338156/table-naming-dilemma-singular-vs-plural-names |
Beta Was this translation helpful? Give feedback.
-
I think the best comment in those links was But you're right, at the end of the day it's a personal preference. |
Beta Was this translation helpful? Give feedback.
-
Default behavior is to pluralize entities (which is odd since its the opposite of how Dapper itself works by default) but there's also no way to override it as the method is protected in OrmConventions
Probably best solution is to expose it as a boolean property on OrmConfiguration that in turn sets the conventions appropriately.
Beta Was this translation helpful? Give feedback.
All reactions