I'm using Entity Framework Core in .Net Core 2.2, with the recently released Oracle.EntityFrameworkCore library.
I'd like to be able to generate a query like this...
select nvl(nullablecolumn, 'N') from table;
I think I'm right in saying that I can't do this, at least not out of the box... I can however do something similar, using something like this (but then if I end up writing this, why not write actual SQL and skip Entity Framework???)...
from row in table
select new { somedata = row.nullablecolumn ?? "N" };
The above linq query gets me the same sort of answer as I'm after... question is, can I do some expression tree magic to get the same result?
For example, this question looks like it generates an expression tree for a "like" query, so how would I generate an expression tree (or modify the existing expression tree) to make the select side of the statement emit nvl()?
This would be useful where you have Entity Framework Value Conversions...
Bonus points (if I could give bonus points) if you can give me a clue on how to create an expression tree to manipulate the where side of the query... AutoMapper manages this somehow with "Projections"?
Any thoughts/pointers would be greatly appreciated...