Question

Maybe the answer will be "by design". But enum properties are mostly used for filtering. So they need "Db Index". But If you map them to varchar(max) we could not create index for them in Sql Server.

So if answer is "by design" could you add [Flag] style binding alternative.

Was it helpful?

Solution

This is architectural mistake to me and no solution.

So we made

int UserTypeId {get;set,} // It is for db
UserTypeEnum UserTypeEnum {get;set;} // It manipulates UserTypeId and read from UserTypeId
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top