I need to be able to perform a string based, bitwise, .OrderBy in dynamic linq.
items = items.OrderBy(x => (x.Permissions & 65536) != 0);
vs.
items = items.Where("1==1" + where).OrderBy("Permissions & 65536 != 0")
Is this even possible? I don't see any examples for bitwise operators in the download (CSharpSamples.zip\LinqSamples\DynamicQuery). I can't get anything to work and I can't find any examples. Help!
You can reorder the columns of the data base on string inputs. The code below is tested and works.