Oracle.ManagedDataAccess.EntityFramework 6.122.1.0 library is used to access to an Oracle Database from MVC ASP.Net application. It is the latest library version from the NuGet as of November, 14th 2017
protected override Expression<Func<MyEntity, object>> getSelector()
{
return m => new
{
ID = m.ID,
NAME = m.Name,
LONGSTRING = "Blah-blah-blah-blah...some thousands characters..." +
m.ID + "blah-blah...blah"
};
}
protected override ProblemMethod()
{
var result = db.MyEntity.Select(getSelector()).ToList();
}
There is the problem. That happens, because very long string (some thousands characters) is concatinated into LONGSTRING , and execution of Select throw the next exception.
ORA-00932: inconsistent datatypes: "'expected CLOB got CHAR"
My class need to get Expression with the GetSelector() overriding.
How to overcome the error or get round it? One way to get round is force EF to execute Select on the client. How to do it?
UPDATE
I should have to present MyEntity
CREATE TABLE MyEntity (ID NUMBER(10), Name VARCHAR2(100));