Class SnakeCaseNamingConvention
Converts CLR names to snake_case: SimpleEntity becomes simple_entity,
FirstName becomes first_name. Runs of capitals are treated as one word, so
OrderID becomes order_id and HTTPServer becomes http_server.
public sealed class SnakeCaseNamingConvention : INamingConvention
- Inheritance
-
SnakeCaseNamingConvention
- Implements
- Inherited Members
- Extension Methods
Remarks
For interfaces the leading I is dropped when it is followed by another capital, so
IProduct maps to product (but Idle stays idle).
Properties
Instance
The shared stateless instance.
public static SnakeCaseNamingConvention Instance { get; }
Property Value
Methods
ColumnName(string)
Converts a property name into its column name, for example FirstName to first_name.
public string ColumnName(string propertyName)
Parameters
propertyNamestring
Returns
TableName(string, bool)
Converts the CLR table name (usually the type name).
public string TableName(string clrName, bool isInterface)
Parameters
clrNamestringThe CLR type name, for example
SimpleEntity.isInterfaceboolWhether the source type is an interface.