The Oracle.ManagedDataAccess.EntityFramework 6.122.1.0 library is used to access the Oracle database from ASP.Net MVC application. This is the latest version of the library from NuGet as of November 14, 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 a problem. This is because a very long string (several thousand characters) is combined into LONGSTRING , and executing Select raises the following exception.
ORA-00932: inconsistent data types: "expected CLOB received CHAR"
My class should get Expression with an override of GetSelector() . How to overcome a mistake or get around it? One way around this is to force EF to perform Select on the client. How to do it?
PS: The same question in Russian.
UPDATE
I need to introduce MyEntity
CREATE TABLE MyEntity (ID NUMBER(10), Name VARCHAR2(100));
c # oracle entity-framework clob oracle-manageddataaccess
3per
source share