I would like to use the ?? operator, and thus avoid large chains have to use the IIF operator.
Example:
customers.Select ("new (CompanyName as Name, Phone)");
customers.Select ("new (CompanyName as Name, iif (Phone = null, string.Empty, Phone) as Phone)");
customers.Select ("new (CompanyName as Name, (Phone ?? string.Empty) as Phone)");
Or maybe there's another way to do this.
See http://weblogs.asp.net/scottgu/dynamic-linq-part-1-using-the-linq-dynamic-query-library
and https://msdn.microsoft.com/en-US/vstudio/bb894665.aspx
Dynamic linq takes a string and converts it to the Linq equivalent. You can even get source code form links and check the parse of string options.
I just checked the library and think it would have very little chance of doing what you want.
the tokenId enum says a lot about what is possible
I just opened the Parser and saw this....
private enum TokenId {
Unknown,
End,
Identifier,
StringLiteral,
IntegerLiteral,
RealLiteral,
Exclamation,
Percent,
Amphersand,
OpenParen,
CloseParen,
Asterisk,
Plus,
Comma,
Minus,
Dot,
Slash,
Colon,
LessThan,
Equal,
GreaterThan,
Question,
OpenBracket,
CloseBracket,
Bar,
ExclamationEqual,
DoubleAmphersand,
LessThanEqual,
LessGreater,
DoubleEqual,
GreaterThanEqual,
DoubleBar
}