Marc-Antoine Plaut
Marc-Antoine Plaut

Reputation: 43

How to change the naming convention on ServiceStack ORMLite

Is there a way to change the naming convention used by ORMLite to create database column ? I'd like to use ColumnLikeThis instead of column_like_that .

Any idea ?

Upvotes: 3

Views: 716

Answers (1)

mythz
mythz

Reputation: 143284

You can specify a different naming strategy with:

OrmLiteConfig.DialectProvider.NamingStrategy= new OrmLiteNamingStrategyBase();

Here are some examples of different naming strategies.

Most Dialects use the default strategy above but other RDBMS providers like PostgreSQL use the more conventional PostgreSqlNamingStrategy.

Upvotes: 4

Related Questions