Oguz Karadenizli
Oguz Karadenizli

Reputation: 3505

How to Persist an enum as integer or shortint in ServiceStack.OrmLite?

As a default, enum properties are stored as varchar(8000) in Sql Server. How can I store as shortint or int?

public enum MyEnum
{
   EnumA=1,
   EnumB=2,
   EnumC=3
}

Not fragile.

Upvotes: 2

Views: 545

Answers (1)

Oguz Karadenizli
Oguz Karadenizli

Reputation: 3505

There is no solution for it. You have to implement your own Enum as int wrapper.

Upvotes: 1

Related Questions