c# - Large object (ntext and image) cannot be used in ORDER BY clauses -


i wanted change code-first project sql server compact 4.0.

but have problem following linq expression

db.test.orderby(t => t.name).tolist() 

it throws following error

large object (ntext , image) cannot used in order clauses

is there way tell code-first create nvarchar type name field instead of ntext type when creating database?

yes. decorate name property of entity class attribute:

[column(typename = "nvarchar(max)")] 

that should trick.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -