Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Guid type and ( '>' greater than comparison) in LINQ to SQL

Please, help me. I try compare two guid in .Where() query method. But I get compile error. Error 1 Operator '>' can not be applied to operands of type "System.Guid" and "System.Guid

Guid startUser = ////Here I get user by url id param
List<Friends> friends = Common.DataContext.Friends.Where(u => u.FriendID > startUser).Take(5);
like image 909
user1974307 Avatar asked Nov 04 '22 06:11

user1974307


1 Answers

And with :

u.FriendID.CompareTo(startUser) > 0

?

like image 113
Pragmateek Avatar answered Nov 12 '22 13:11

Pragmateek