daelmo wrote:
That func is a 'delegate' at runtime, so isn't convertable to sql. To do what you want please try FunctionMappings.
Thank you, I will give it a try.
My workaround for now is to sort the result:
Func<string, int> Host = s => Int32.Parse(s.Split('.')[3]);
var terminals = from c in Terminal.GetTerminals() orderby Host(c.Ipaddr) select c;
Terminal.GetTerminals() returns EntityCollection<TerminalEntity>().
Kind regards,
Carlo