EF 时间戳问题
想从数据库检索小于某个时间戳的数据
sql可以这样写
"select top 10 form T1 where convert(bigint,T1.columnTimestamp) < 55555"
T1:表名称
columnTimestamp:列名称,timestamp类型
用linq这么写肯定不对:
db.T1.Where(c=>BitConverter.ToInt64(c.columnTimestamp,0) < 55555).Take(10);
请问大家怎么处理的?
(db.ExecuteStoreQuery<T1>(sql).ToList()不算)