c# - The function 'CreateTime' is not supported by SQL Server Compact -
i wanted change code-first project sql server compact 4.0.
but have problem following linq expression
db.test.orderby(t => t.name) .thenby(t => t.dayofweek) .thenby(t => dbfunctions.createtime(t.timefrom.hour, t.timefrom.minute, t.timefrom.second))
it throws following error
the function 'createtime' not supported sql server compact
is there way write expression without using createtime
method?
i'm using code-first sql server compact. in model have property called timestamp of type datetime. @ do:
db.test.orderby(t => t.name) .thenby(t => t.timestamp.dayofweek) .thenby(t => t.timestamp.hour) .thenby(t => t.timestamp.minute) .thenby(t => t.timestamp.second) .thenby(t => t.timestamp.millisecond);
or
db.test.orderby(t => t.name) .thenby(t => t.timestamp.ticks);
Comments
Post a Comment