I try something like this:
Code: Select all
var item = DbContext.GetTable<SomeEntity>().Select(d => new
{
Str1 = "",
Str2 = d.Name,
}).First();
Code: Select all
var item = DbContext.GetTable<SomeEntity>().Select(d => new
{
Str1 = "",
Str2 = d.Name,
}).First();
At that rate I don't understand two things:MariiaI wrote:This issue is not related to dotConnect for Oracle. This is related to the fact that Oracle converts empty strings ("") to null.
Code: Select all
var item2 = DbContext.GetTable<SomeEntity>().Select(d => new
{
Str1 = "",
Str2 = "",
}).First();
Code: Select all
SELECT t1.NAME FROM SOMETABLE t1 WHERE ROWNUM <= 1
Please specify the version of Entity Framework you are working with. Also, please send us a small test project, so that we are able to reproduce the behaviour you have encountered, basing on your scenario.Albert wrote: At that rate I don't understand two things:
1) Why the same query gives me item.str1 = "" (not null) with dotConnect for Oracle v6.0.58?
2) Why the following querygives me item2 = { Str1 = "", Str2 = "" }. Both queries are not querying empty(null) strings from oracle. For example, first query translates to:Code: Select all
var item2 = DbContext.GetTable<SomeEntity>().Select(d => new { Str1 = "", Str2 = "", }).First();
Thus, Str1 must be defined on client-side. Could you explain please, what is going on? Thanks!Code: Select all
SELECT t1.NAME FROM SOMETABLE t1 WHERE ROWNUM <= 1