This is the Linq To SQL query I am trying to execute. However, Int64.Parse fails as there is no Hexadecimal to Decimal equivalent in SQL.
Basically, I have 2 columns Guid1 and Guid2 expecting to get a result where for example 1 -> 2
and 2 -> 1
are grouped together.
SomeTable.GroupBy(x => new {
Max = Math.Max(Int64.Parse(x.Guid1.Replace('-','0').Substring(0,15),16),
Int64.Parse(x.Guid2.Replace('-','0').Substring(0,15),16) ),
Min = Math.Min(Int64.Parse(x.Guid1.Replace('-','0').Substring(0,15),16),
Int64.Parse(x.Guid2.Replace('-','0').Substring(0,15),16))
})
EDIT: To Add More Context, please refer to Linq distinct based on two columns The only difference here is except for number columns, we have GUID columns.