开发者

Entity Framework LINQ - How to perform an alphabetical string comparison e.g. Where Name > "Bob"

In TSQL I can do this:

select * from Person where Name > 'Bob'

How do I do this with an entity framework LINQ query?

var results = db.People.Where(p开发者_如何学Python => p.Name > "Bob"); // error


You have to use .compareTo to do a string comparison.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜