I am using the Entity Framework in conjunction with an Oracle provider. With this LINQ query, I cannot set the variable "suffix" to string.empty or "" for a new projection.
var data = from order in _context.ordersselect
new OrderModel
{
Id = order.Id,
Suffix = order.suffix ?? string.Empty
or
Suffix = string.Empty
};
data.Suffix => is always null.
With the In-Memory Database Provider from Microsoft, for example, the same query returns an empty string as requested. According to Oracle documentation, Oracle treats an empty string the same as one that is set to null. Have I understood correctly, that I cannot set a string variable to "" or string.empty in an Oracle Linq query and have to do this outside the Linq query?