开发者

How can I get all objects with a timestamp greater than X from an EF repo?

开发者 https://www.devze.com 2023-01-04 04:00 出处:网络
I have a timestamp (rowversion) column (called t_stamp) in my tables. I use EF4 as my ORM. I see that the timestamp fields become byte[] properties on my objects.

I have a timestamp (rowversion) column (called t_stamp) in my tables. I use EF4 as my ORM. I see that the timestamp fields become byte[] properties on my objects.

I want to use LINQ something like this:

byte[] last = 0x00782342

from o in _db.Objects
where o.t_stamp > last
select o

But t开发者_StackOverflow中文版hat doesn't work because I can't use > on a byte[].

What is the correct way to do this?

0

精彩评论

暂无评论...
验证码 换一张
取 消