Table of Contents

Class SnakeCaseNamingConvention

Namespace
NextORM.Core
Assembly
nextorm.core.dll

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

SnakeCaseNamingConvention

Methods

ColumnName(string)

Converts a property name into its column name, for example FirstName to first_name.

public string ColumnName(string propertyName)

Parameters

propertyName string

Returns

string

TableName(string, bool)

Converts the CLR table name (usually the type name).

public string TableName(string clrName, bool isInterface)

Parameters

clrName string

The CLR type name, for example SimpleEntity.

isInterface bool

Whether the source type is an interface.

Returns

string